simulations.core.strategy.decisionSupportStrategy
Class CoalitionalDef4DecisionStrategy

java.lang.Object
  extended by simulations.core.strategy.Strategy
      extended by simulations.core.strategy.decisionSupportStrategy.DecisionSupportStrategy
          extended by simulations.core.strategy.decisionSupportStrategy.CoalitionalDef4DecisionStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class CoalitionalDef4DecisionStrategy
extends DecisionSupportStrategy

This class describes a decison support strategy that ack players that accept attack from players in my coalition vs players that are not in my coalition (definition 4) from last turn

See Also:
Serialized Form

Field Summary
 
Fields inherited from class simulations.core.strategy.decisionSupportStrategy.DecisionSupportStrategy
memoryParam, negative
 
Fields inherited from class simulations.core.strategy.Strategy
abr, memory, name, randomGenerator
 
Constructor Summary
CoalitionalDef4DecisionStrategy()
          Creates a new instance of CoalitionalDef4DecisionStrategy
 
Method Summary
 java.lang.String getDescription()
          return the description of this decision support strategy
 boolean supportAttack(Player player, Player attackingPlayer, Player attackedPlayer, java.util.ArrayList playerList)
          return true if the player will support the attack.
 void updateAttacksInfos(Player player, java.util.ArrayList attacksList)
          This method is called by the judge after the decision of players to attack and to ask supports to inform the strategy
 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.decisionSupportStrategy.DecisionSupportStrategy
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

CoalitionalDef4DecisionStrategy

public CoalitionalDef4DecisionStrategy()
Creates a new instance of CoalitionalDef4DecisionStrategy

Method Detail

getDescription

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

Specified by:
getDescription in class DecisionSupportStrategy
Returns:
return the description of this decision support strategy

supportAttack

public boolean supportAttack(Player player,
                             Player attackingPlayer,
                             Player attackedPlayer,
                             java.util.ArrayList playerList)
return true if the player will support the attack.

Specified by:
supportAttack in class DecisionSupportStrategy
Parameters:
playerList - The list of remaining players
player - The owner of the strategy
attackingPlayer - The attacking player
attackedPlayer - The attacked player
Returns:
return true if the player will support the attack.

updateAttacksInfos

public void updateAttacksInfos(Player player,
                               java.util.ArrayList attacksList)
This method is called by the judge after the decision of players to attack and to ask supports to inform the strategy

Specified by:
updateAttacksInfos in class DecisionSupportStrategy
Parameters:
player - The owner of the strategy
attacksList - The list of attacks

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 DecisionSupportStrategy
Parameters:
turn - The turn
player - The owner of the strategy
remainingPlayers - The list of the remaining players