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 booleanequals(java.lang.Object o)PointChainExplosiongetChainExplosion()intgetColor()PointColorChangegetColorChange()intgetExplosionCounter()intgetExplosionStrength()FogStategetFog()intgetHeatLevel()intgetID()Gets a unique ID of the point.ThingStategetOccupant()intgetX()intgetY()inthashCode()booleanisExploding()Checks, if this point is exploding.booleanisTarget()voidsetChainExplosion(PointChainExplosion chainExplosion)voidsetColor(int color)voidsetColorChange(PointColorChange colorChange)voidsetExplosionCounter(int explosionCounter)voidsetExplosionStrength(int explosionStrength)voidsetFog(FogState fog)voidsetIsTarget(boolean isTarget)voidsetOccupant(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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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
-
-