/* * AskingNoOneStrategy.java * * Created on April 9, 2004, 2:44 AM */ package simulations.core.strategy.askingSupportStrategy; import simulations.core.Player; import java.util.ArrayList; import java.util.Iterator; import simulations.core.history.Turn; /** This class describes an asking strategy that aking help to nobody * @author tom */ public class AskingNoBodyStrategy extends AskingStrategy { /** Creates a new instance of AskingNoOneStrategy */ public AskingNoBodyStrategy() { super(); name="AskingNoBodyStrategy"; memoryParam=false; abr="2"; } /** Returns the list of players to ask support. * @return Returns the list of players to ask support. * @param attackedPlayer The attacked player * @param player The attacking player * @param playerList The list of avalaible player */ public ArrayList getPlayersToAskSupport(Player player, Player attackedPlayer, ArrayList playerList) { if (negative) { playerList.remove(player); return playerList; } else { return new ArrayList(); } } /** This method is called by the judge to inform players of the last turn * @param turn The turn * @param player The owner of the strategy * @param remainingPlayers The list of the remaining players */ public void updateLastTurn(simulations.core.history.Turn turn, Player player, ArrayList remainingPlayers) { } /** This method returns the description of the strategy * @return returns the description of the strategy */ public String getDescription() { if (negative) { return "Asking support strategy :\n"+ "I ask support to nobody\n"+ "COMPLEMENTARY"; } else { return "Asking support strategy :\n"+ "I ask support to nobody\n"; } } }