jfreerails.world.common
Class GameSpeed
java.lang.Object
jfreerails.world.common.GameSpeed
- All Implemented Interfaces:
- java.io.Serializable, FreerailsSerializable
public class GameSpeed
- extends java.lang.Object
- implements FreerailsSerializable
This class represents actual game speed. If the game speed speed
is lesser then zero, game is paused. After unpausing, the speed should be
-speed.
I.e. pausing/unpausing is equal to multiply the speed by -1.
- Author:
- MystiqueAgent
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
speed
private final int speed
GameSpeed
public GameSpeed(int speed)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getSpeed
public int getSpeed()
isPaused
public boolean isPaused()
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