Package com.starpoints.state
Class PointState
- java.lang.Object
-
- com.starpoints.state.PointState
-
- All Implemented Interfaces:
java.io.Serializable
public class PointState extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PointState(int ID, int x, int y, int color, int explosionStrength, int explosionCounter, int heatLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
PointChainExplosion
getChainExplosion()
int
getColor()
PointColorChange
getColorChange()
int
getExplosionCounter()
int
getExplosionStrength()
FogState
getFog()
int
getHeatLevel()
int
getID()
Gets a unique ID of the point.ThingState
getOccupant()
int
getX()
int
getY()
int
hashCode()
boolean
isExploding()
Checks, if this point is exploding.boolean
isTarget()
void
setChainExplosion(PointChainExplosion chainExplosion)
void
setColor(int color)
void
setColorChange(PointColorChange colorChange)
void
setExplosionCounter(int explosionCounter)
void
setExplosionStrength(int explosionStrength)
void
setFog(FogState fog)
void
setIsTarget(boolean isTarget)
void
setOccupant(ThingState occupant)
-
-
-
Method Detail
-
getOccupant
public ThingState getOccupant()
- Returns:
- the occupant
-
setOccupant
public void setOccupant(ThingState occupant)
- Parameters:
occupant
- the occupant to set
-
getFog
public FogState getFog()
- Returns:
- the fog
-
setFog
public void setFog(FogState fog)
- Parameters:
fog
- the fog to set
-
getX
public int getX()
- Returns:
- the x
-
getY
public int getY()
- Returns:
- the y
-
getColor
public int getColor()
- Returns:
- the color
-
setColor
public void setColor(int color)
- Parameters:
color
- the color to set
-
getExplosionStrength
public int getExplosionStrength()
- Returns:
- the explosionStrength
-
setExplosionStrength
public void setExplosionStrength(int explosionStrength)
- Parameters:
explosionStrength
- the explosionStrength to set
-
getExplosionCounter
public int getExplosionCounter()
- Returns:
- the explosionCounter
-
setExplosionCounter
public void setExplosionCounter(int explosionCounter)
- Parameters:
explosionCounter
- the explosionCounter to set
-
getHeatLevel
public int getHeatLevel()
- Returns:
- the heatLevel
-
getColorChange
public PointColorChange getColorChange()
- Returns:
- the colorChange
-
setColorChange
public void setColorChange(PointColorChange colorChange)
- Parameters:
colorChange
- the colorChange to set
-
getChainExplosion
public PointChainExplosion getChainExplosion()
- Returns:
- the chainExplosion
-
setChainExplosion
public void setChainExplosion(PointChainExplosion chainExplosion)
- Parameters:
chainExplosion
- the chainExplosion to set
-
isExploding
public boolean isExploding()
Checks, if this point is exploding.- Returns:
- true, if this points explosionCounter is greater 0.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getID
public int getID()
Gets a unique ID of the point.- Returns:
-
isTarget
public boolean isTarget()
- Returns:
- the isTarget
-
setIsTarget
public void setIsTarget(boolean isTarget)
- Parameters:
isTarget
- the isTarget to set
-
-