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.

Constructor Index

 o ServerCell(int, int)
construct a new server cell at the given location

Method Index

 o artillery(int, int)
set shells coming into the cell from a particular player.
 o clearArtillery()
empty out all incoming shells
 o clearParatroops()
empty out all incoming paratroops
 o getFighters(int)
tell us how many fighters are coming in from direction "d".
 o getParatroops(int)
return how many paratroops of player p are incoming
 o getShells(int)
return how many shells from player p are incoming
 o isVisible(int)
return true if the given player can see this cell, false otherwise
 o paratroop(int, int)
set paratroops coming into the cell from a particular player.
 o setFighters(int, int)
sets how many fighters are left over on a particular direction's pipe.
 o setVisible(int, boolean)
set the visibility state for this cell

Constructors

 o ServerCell
  public ServerCell(int r,
                    int c)
construct a new server cell at the given location
Parameters:
r - the row
c - the column

Methods

 o isVisible
  public boolean isVisible(int player)
return true if the given player can see this cell, false otherwise
Overrides:
isVisible in class Cell
 o setVisible
  public final void setVisible(int player,
                               boolean state)
set the visibility state for this cell
 o 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
 o 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
 o 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
 o 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
 o clearParatroops
  public final void clearParatroops()
empty out all incoming paratroops
 o clearArtillery
  public final void clearArtillery()
empty out all incoming shells
 o getParatroops
  public final int getParatroops(int p)
return how many paratroops of player p are incoming
 o 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