simulations.core.strategy.decisionSupportStrategy
Class AcceptAskingPlayersStrongestThanMe
java.lang.Object
simulations.core.strategy.Strategy
simulations.core.strategy.decisionSupportStrategy.DecisionSupportStrategy
simulations.core.strategy.decisionSupportStrategy.AcceptAskingPlayersStrongestThanMe
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class AcceptAskingPlayersStrongestThanMe
- extends DecisionSupportStrategy
This class describes an decision strategy that accept to support to players
that have more points than me
- See Also:
- Serialized Form
Method Summary |
java.lang.String |
getDescription()
return the description of this attack 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 java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AcceptAskingPlayersStrongestThanMe
public AcceptAskingPlayersStrongestThanMe()
- Creates a new instance of AcceptAskingPlayersStrongestThanMe
getDescription
public java.lang.String getDescription()
- return the description of this attack strategy
- Specified by:
getDescription
in class DecisionSupportStrategy
- Returns:
- return the description of this attack 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:
player
- The owner of the strategyattackingPlayer
- The attacking playerattackedPlayer
- The attacked playerplayerList
- The list of remaining players
- 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 strategyattacksList
- 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 turnplayer
- The owner of the strategyremainingPlayers
- The list of the remaining players