Package net.sf.colossus.variant
Class Hex
- java.lang.Object
-
- net.sf.colossus.variant.Hex
-
-
Constructor Summary
Constructors Constructor Description Hex(java.lang.String label, int xCoord, int yCoord)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
We consider two hexes equal if their x/y coordinates are the same.java.lang.String
getDescription()
java.lang.String
getLabel()
abstract java.lang.String
getTerrainName()
int
getXCoord()
int
getYCoord()
int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
-
getTerrainName
public abstract java.lang.String getTerrainName()
-
getDescription
public java.lang.String getDescription()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getXCoord
public int getXCoord()
-
getYCoord
public int getYCoord()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
We consider two hexes equal if their x/y coordinates are the same. This gives equality within the context of a HexMap, since we don't know to which map the Hex belongs we can't do any better.- Overrides:
equals
in classjava.lang.Object
-
-