Class games.Battle.server.ServerBoard.ServerCell
All Packages Class Hierarchy This Package Previous Next Index
Class games.Battle.server.ServerBoard.ServerCell
java.lang.Object
|
+----games.Battle.shared.sys.Cell
|
+----games.Battle.server.ServerBoard.ServerCell
- public class ServerCell
- extends Cell
ServerCell implements functionality for game squares that is specific to
the server's needs.
-
ServerCell(int, int)
- construct a new server cell at the given location
-
artillery(int, int)
- set shells coming into the cell from a particular player.
-
clearArtillery()
- empty out all incoming shells
-
clearParatroops()
- empty out all incoming paratroops
-
getFighters(int)
- tell us how many fighters are coming in from direction "d".
-
getParatroops(int)
- return how many paratroops of player p are incoming
-
getShells(int)
- return how many shells from player p are incoming
-
isVisible(int)
- return true if the given player can see this cell, false
otherwise
-
paratroop(int, int)
- set paratroops coming into the cell from a particular player.
-
setFighters(int, int)
- sets how many fighters are left over on a particular direction's pipe.
-
setVisible(int, boolean)
- set the visibility state for this cell
ServerCell
public ServerCell(int r,
int c)
- construct a new server cell at the given location
- Parameters:
- r - the row
- c - the column
isVisible
public boolean isVisible(int player)
- return true if the given player can see this cell, false
otherwise
- Overrides:
- isVisible in class Cell
setVisible
public final void setVisible(int player,
boolean state)
- set the visibility state for this cell
getFighters
public final int getFighters(int d)
- tell us how many fighters are coming in from direction "d". These armies
are "leftovers" from the last turn's combat.
- Parameters:
- d - the direction
setFighters
public final void setFighters(int d,
int f)
- sets how many fighters are left over on a particular direction's pipe.
- Parameters:
- d - the direction
- f - the number of units
paratroop
public final int paratroop(int player,
int num)
- set paratroops coming into the cell from a particular player.
- Parameters:
- player - the player number
- num - ignored
artillery
public final int artillery(int player,
int num)
- set shells coming into the cell from a particular player.
- Parameters:
- player - the player number
- num - ignored
clearParatroops
public final void clearParatroops()
- empty out all incoming paratroops
clearArtillery
public final void clearArtillery()
- empty out all incoming shells
getParatroops
public final int getParatroops(int p)
- return how many paratroops of player p are incoming
getShells
public final int getShells(int p)
- return how many shells from player p are incoming
All Packages Class Hierarchy This Package Previous Next Index