net.sourceforge.cilib.games.states
Class GameState
java.lang.Object
net.sourceforge.cilib.games.states.GameState
- All Implemented Interfaces:
- Serializable, Cloneable
- Direct Known Subclasses:
- GridGameState, ListGameState
public abstract class GameState
- extends Object
- implements Cloneable
- Author:
- leo
This class represents a snapshot of the game at any given iteration.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentIteration
protected int currentIteration
randomizer
protected GameSeedingStrategy randomizer
GameState
public GameState()
GameState
public GameState(GameState other)
clearState
public abstract void clearState()
- Clear the state and reset it to a start state.
getClone
public abstract GameState getClone()
- Create a cloned copy of the current object and return it. In general
the created copy will be a deep copy of the provided instance. As
a result this operation an be quite expensive if used incorrectly.
- Specified by:
getClone
in interface Cloneable
- Returns:
- An exact clone of the current object instance.
- See Also:
Object.clone()
resetIterationCount
public void resetIterationCount()
increaseIteration
public void increaseIteration()
getCurrentIteration
public int getCurrentIteration()
getRandomizer
public GameSeedingStrategy getRandomizer()
setRandomizer
public void setRandomizer(GameSeedingStrategy randomizer)
Copyright © 2009 CIRG. All Rights Reserved.