Finished Road Class (Java Doc and Code Style)
This commit is contained in:
parent
9096e28d78
commit
a05da8fb34
|
@ -2,11 +2,12 @@ package ch.zhaw.catan;
|
|||
|
||||
import java.awt.Point;
|
||||
|
||||
/// TODO: 09/12/2021 Java Doc
|
||||
|
||||
/**
|
||||
* sub Class of Structure
|
||||
* Sub Class of Structure
|
||||
* Can be saved in Siedler Board on Edges.
|
||||
*
|
||||
* @author Andrin Fassbind, Michael Ziegler
|
||||
*/
|
||||
public class Road extends Structure {
|
||||
|
||||
|
@ -14,11 +15,11 @@ public class Road extends Structure {
|
|||
private final Point start, end;
|
||||
|
||||
/**
|
||||
* Constructor of Road
|
||||
* Constructs a road with a start and endpoint.
|
||||
*
|
||||
* @param faction The faction of the owner
|
||||
* @param start the coordinates of the start Point
|
||||
* @param end the coordinates of the End Point
|
||||
* @param faction The faction of the road owner
|
||||
* @param start the coordinates of the start as a Point
|
||||
* @param end the coordinates of the end as a Point
|
||||
*/
|
||||
public Road(Config.Faction faction, Point start, Point end) {
|
||||
super(faction);
|
||||
|
@ -27,14 +28,18 @@ public class Road extends Structure {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return the coordinates of the start Point
|
||||
* Returns the Coordinate as a Point of the start of the road.
|
||||
*
|
||||
* @return Point of the start of the road
|
||||
*/
|
||||
public Point getStart() {
|
||||
return start;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the coordinates of the end Point
|
||||
* Returns the Coordinate as a Point of the end of the road.
|
||||
*
|
||||
* @return Point of the end of the road
|
||||
*/
|
||||
public Point getEnd() {
|
||||
return end;
|
||||
|
|
Loading…
Reference in New Issue