simulations.gui.coalitions
Class CoalitionTable

java.lang.Object
  extended by simulations.gui.coalitions.CoalitionTable

public class CoalitionTable
extends java.lang.Object

This class is used to store who attack who directly or indirectly


Constructor Summary
CoalitionTable(java.util.ArrayList playerList)
          Creates a new instance of CoalitionTable
 
Method Summary
 java.util.ArrayList getAttackingPlayers(Player player)
          Returns the list of players that have attacked player
 java.util.ArrayList getPlayerList()
          Getter for property playerList.
 boolean[][] getTable()
          Getter for property table.
 void setPlayerList(java.util.ArrayList playerList)
          Setter for property playerList.
 void setTable(boolean[][] table)
          Setter for property table.
 void setTable(Turn turn)
          This method init the table with the turn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoalitionTable

public CoalitionTable(java.util.ArrayList playerList)
Creates a new instance of CoalitionTable

Parameters:
playerList - The players list
Method Detail

getAttackingPlayers

public java.util.ArrayList getAttackingPlayers(Player player)
Returns the list of players that have attacked player

Parameters:
player - The player
Returns:
Returns the list of players that have attacked player

setTable

public void setTable(Turn turn)
This method init the table with the turn

Parameters:
turn - The turn to use

getPlayerList

public java.util.ArrayList getPlayerList()
Getter for property playerList.

Returns:
Value of property playerList.

setPlayerList

public void setPlayerList(java.util.ArrayList playerList)
Setter for property playerList.

Parameters:
playerList - New value of property playerList.

getTable

public boolean[][] getTable()
Getter for property table.

Returns:
Value of property table.

setTable

public void setTable(boolean[][] table)
Setter for property table.

Parameters:
table - New value of property table.