|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimulations.core.strategy.Strategy
simulations.core.strategy.decisionSupportStrategy.DecisionSupportStrategy
public abstract class DecisionSupportStrategy
This abstract class describes haw to construct a decision strategy
Field Summary | |
---|---|
protected boolean |
memoryParam
True if the strategy is memory signifiant |
protected boolean |
negative
True if the strategy is the negation |
Fields inherited from class simulations.core.strategy.Strategy |
---|
abr, memory, name, randomGenerator |
Constructor Summary | |
---|---|
DecisionSupportStrategy()
Creates a new instance of DecisionSupportStrategy |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
overload of equals method |
abstract java.lang.String |
getDescription()
return the description of this decision support strategy |
boolean |
isMemoryParam()
Getter for property memoryParam. |
boolean |
isNegative()
Getter for property negative. |
void |
setMemoryParam(boolean memoryParam)
Setter for property memoryParam. |
void |
setNegative(boolean negative)
Setter for property negative. |
abstract boolean |
supportAttack(Player player,
Player attackingPlayer,
Player attackedPlayer,
java.util.ArrayList playerList)
return true if the player will support the attack. |
abstract 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 |
abstract 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.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 |
Field Detail |
---|
protected boolean negative
protected boolean memoryParam
Constructor Detail |
---|
public DecisionSupportStrategy()
Method Detail |
---|
public abstract boolean supportAttack(Player player, Player attackingPlayer, Player attackedPlayer, java.util.ArrayList playerList)
playerList
- The list of remaining playersplayer
- The owner of the strategyattackingPlayer
- The attacking playerattackedPlayer
- The attacked player
public abstract void updateAttacksInfos(Player player, java.util.ArrayList attacksList)
player
- The owner of the strategyattacksList
- The list of attackspublic abstract void updateLastTurn(Turn turn, Player player, java.util.ArrayList remainingPlayers)
turn
- The turnplayer
- The owner of the strategyremainingPlayers
- The list of the remaining playerspublic abstract java.lang.String getDescription()
getDescription
in class Strategy
public boolean equals(java.lang.Object o)
equals
in class Strategy
o
- The object to compare
public boolean isNegative()
public void setNegative(boolean negative)
negative
- New value of property negative.public boolean isMemoryParam()
public void setMemoryParam(boolean memoryParam)
memoryParam
- New value of property memoryParam.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |