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

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

public class RandomPredPreyInitializationStrategy
extends PredPreyPositionInitializationStrategy

Author:
leo This PredPreyPositionInitializationStrategy initialises each agent to a random location
See Also:
Serialized Form

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

Constructor Detail

RandomPredPreyInitializationStrategy

public RandomPredPreyInitializationStrategy()

RandomPredPreyInitializationStrategy

public RandomPredPreyInitializationStrategy(PredPreyPositionInitializationStrategy other)
Copy constructor

Parameters:
other -
Method Detail

getClone

public RandomPredPreyInitializationStrategy 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


Copyright © 2009 CIRG. All Rights Reserved.