net.sourceforge.cilib.games.states
Class GameState

java.lang.Object
  extended by 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

Field Summary
protected  int currentIteration
           
protected  GameSeedingStrategy randomizer
           
 
Constructor Summary
GameState()
           
GameState(GameState other)
           
 
Method Summary
abstract  void clearState()
          Clear the state and reset it to a start state.
abstract  GameState getClone()
          Create a cloned copy of the current object and return it.
 int getCurrentIteration()
           
 GameSeedingStrategy getRandomizer()
           
 void increaseIteration()
           
 void resetIterationCount()
           
 void setRandomizer(GameSeedingStrategy randomizer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentIteration

protected int currentIteration

randomizer

protected GameSeedingStrategy randomizer
Constructor Detail

GameState

public GameState()

GameState

public GameState(GameState other)
Method Detail

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.