games.strategy.engine.data
Class Unit
java.lang.Object
games.strategy.engine.data.GameDataComponent
games.strategy.engine.data.Unit
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- TripleAUnit
public class Unit
- extends GameDataComponent
- implements java.io.Serializable
- Author:
- Sean Bridges
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Unit
protected Unit(UnitType type,
PlayerID owner,
GameData data)
- Creates new Unit. Should use a call to UnitType.create() instead.
owner can be null
getID
public GUID getID()
getType
public UnitType getType()
getUnitType
public UnitType getUnitType()
getOwner
public PlayerID getOwner()
getHits
public int getHits()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object