public class Edge
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private CatanColor |
color |
private Coordinate |
end |
private boolean |
roadExists |
private static long |
serialVersionUID |
private Coordinate |
start |
Constructor and Description |
---|
Edge(Coordinate start,
Coordinate end)
Creates an edge object.
|
Modifier and Type | Method and Description |
---|---|
void |
ClearRoad()
Removes any road associated with an edge.
|
boolean |
doesRoadExists() |
boolean |
equals(java.lang.Object obj) |
CatanColor |
getColor() |
Coordinate |
getEnd() |
static int |
GetRotation(Coordinate hex,
Coordinate start,
Coordinate end) |
int |
GetRotation(Hex hex) |
Coordinate |
getStart() |
int |
hashCode() |
void |
SetRoad(CatanColor color)
Places a road on the edge.
|
java.lang.String |
toString() |
private static final long serialVersionUID
private Coordinate start
private Coordinate end
private boolean roadExists
private CatanColor color
public Edge(Coordinate start, Coordinate end)
public void ClearRoad()
public void SetRoad(CatanColor color)
color
- The color of the road.public boolean doesRoadExists()
public Coordinate getStart()
public Coordinate getEnd()
public CatanColor getColor()
public int GetRotation(Hex hex)
public static int GetRotation(Coordinate hex, Coordinate start, Coordinate end)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object