jfreerails.world.top
Class GameRules

java.lang.Object
  extended by jfreerails.world.top.GameRules
All Implemented Interfaces:
java.io.Serializable, FreerailsSerializable

public class GameRules
extends java.lang.Object
implements FreerailsSerializable

Stores rules governing what players are allowed to do, for example whether they can connect their track to the track of other players.

Author:
Luke
See Also:
Serialized Form

Field Summary
private  boolean canConnect2OtherRRTrack
           
static GameRules DEFAULT_RULES
           
private  boolean mustConnect2ExistingTrack
           
static GameRules NO_RESTRICTIONS
           
private static long serialVersionUID
           
 
Constructor Summary
private GameRules(boolean mustConnect, boolean canConnect2others)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 boolean isCanConnect2OtherRRTrack()
           
 boolean isMustConnect2ExistingTrack()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

canConnect2OtherRRTrack

private final boolean canConnect2OtherRRTrack

mustConnect2ExistingTrack

private final boolean mustConnect2ExistingTrack

DEFAULT_RULES

public static final GameRules DEFAULT_RULES

NO_RESTRICTIONS

public static final GameRules NO_RESTRICTIONS
Constructor Detail

GameRules

private GameRules(boolean mustConnect,
                  boolean canConnect2others)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isCanConnect2OtherRRTrack

public boolean isCanConnect2OtherRRTrack()

isMustConnect2ExistingTrack

public boolean isMustConnect2ExistingTrack()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object