public class Vertex
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private CatanColor |
color |
private Coordinate |
point |
private static long |
serialVersionUID |
private PieceType |
type |
Constructor and Description |
---|
Vertex(Coordinate point)
Creates a vertex object.
|
Modifier and Type | Method and Description |
---|---|
void |
ClearType()
Removes a piece from the vertex.
|
boolean |
equals(java.lang.Object obj) |
CatanColor |
getColor() |
Coordinate |
getPoint()
Gets the point for the vertex.
|
PieceType |
getType() |
int |
hashCode() |
void |
SetType(PieceType type,
CatanColor color)
Place a piece on the vertex.
|
java.lang.String |
toString() |
private static final long serialVersionUID
private Coordinate point
private PieceType type
private CatanColor color
public Vertex(Coordinate point)
x
- X coordinatey
- Y coordinatepublic void SetType(PieceType type, CatanColor color)
type
- The type of piece being placed.color
- The color being placed.public void ClearType()
public Coordinate getPoint()
public PieceType getType()
public CatanColor getColor()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object