net.sourceforge.cilib.games.game.predatorprey.init
Class StaticPositionInitializationStrategy

java.lang.Object
  extended by net.sourceforge.cilib.games.game.predatorprey.init.PredPreyPositionInitializationStrategy
      extended by net.sourceforge.cilib.games.game.predatorprey.init.StaticPositionInitializationStrategy
All Implemented Interfaces:
Serializable, Cloneable

public class StaticPositionInitializationStrategy
extends PredPreyPositionInitializationStrategy

Author:
leo This PP initialization strategy initialises the Agents to fixed locations in the grid.
See Also:
Serialized Form

Constructor Summary
StaticPositionInitializationStrategy()
           
StaticPositionInitializationStrategy(StaticPositionInitializationStrategy other)
          Copy constructor
 
Method Summary
 StaticPositionInitializationStrategy getClone()
          Create a cloned copy of the current object and return it.
 ItemLocation getPredLocation()
           
 ItemLocation getPreyLocation()
           
 void initializePP(PredatorPreyGame game)
          Initialize the positions of the predator and prey agents
 void setPredLocation(ItemLocation predLocation)
           
 void setPreyLocation(ItemLocation preyLocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticPositionInitializationStrategy

public StaticPositionInitializationStrategy()

StaticPositionInitializationStrategy

public StaticPositionInitializationStrategy(StaticPositionInitializationStrategy other)
Copy constructor

Parameters:
other -
Method Detail

getClone

public StaticPositionInitializationStrategy 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
Specified by:
getClone in class PredPreyPositionInitializationStrategy
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

initializePP

public void initializePP(PredatorPreyGame game)
Initialize the positions of the predator and prey agents

Specified by:
initializePP in class PredPreyPositionInitializationStrategy
Parameters:
game - The game object to initialise

getPredLocation

public ItemLocation getPredLocation()

setPredLocation

public void setPredLocation(ItemLocation predLocation)

getPreyLocation

public ItemLocation getPreyLocation()

setPreyLocation

public void setPreyLocation(ItemLocation preyLocation)


Copyright © 2009 CIRG. All Rights Reserved.