simulations.core.strategy.askingSupportStrategy
Class CoalitionalDef4AskingStrategy

java.lang.Object
  extended by simulations.core.strategy.Strategy
      extended by simulations.core.strategy.askingSupportStrategy.AskingStrategy
          extended by simulations.core.strategy.askingSupportStrategy.CoalitionalDef4AskingStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class CoalitionalDef4AskingStrategy
extends AskingStrategy

This class describes an asking strategy that ask players that are in my coalition (definition 4) from last turn

See Also:
Serialized Form

Field Summary
 
Fields inherited from class simulations.core.strategy.askingSupportStrategy.AskingStrategy
memoryParam, negative
 
Fields inherited from class simulations.core.strategy.Strategy
abr, memory, name, randomGenerator
 
Constructor Summary
CoalitionalDef4AskingStrategy()
          Creates a new instance of CoalitionalDef4AskingStrategy
 
Method Summary
 java.lang.String getDescription()
          return the description of this asking strategy
 java.util.ArrayList getPlayersToAskSupport(Player player, Player attackedPlayer, java.util.ArrayList playerList)
          Returns the list of players to ask support.
 void updateLastTurn(Turn turn, Player player, java.util.ArrayList remainingPlayers)
          This method is called by the judge to inform players of the last turn
 
Methods inherited from class simulations.core.strategy.askingSupportStrategy.AskingStrategy
equals, isMemoryParam, isNegative, setMemoryParam, setNegative
 
Methods inherited from class simulations.core.strategy.Strategy
getAbr, getMemory, getName, getRandomGenerator, setAbr, setMemory, setName, setRandomGenerator, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoalitionalDef4AskingStrategy

public CoalitionalDef4AskingStrategy()
Creates a new instance of CoalitionalDef4AskingStrategy

Method Detail

getDescription

public java.lang.String getDescription()
return the description of this asking strategy

Specified by:
getDescription in class AskingStrategy
Returns:
return the description of this asking strategy

getPlayersToAskSupport

public java.util.ArrayList getPlayersToAskSupport(Player player,
                                                  Player attackedPlayer,
                                                  java.util.ArrayList playerList)
Returns the list of players to ask support.

Specified by:
getPlayersToAskSupport in class AskingStrategy
Parameters:
attackedPlayer - The attacked player
player - The attacking player
playerList - The list of avalaible player
Returns:
Returns the list of players to ask support.

updateLastTurn

public void updateLastTurn(Turn turn,
                           Player player,
                           java.util.ArrayList remainingPlayers)
This method is called by the judge to inform players of the last turn

Specified by:
updateLastTurn in class AskingStrategy
Parameters:
turn - The turn
player - The owner of the strategy
remainingPlayers - The list of the remaining players