Class games.Battle.shared.sys.Board
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class games.Battle.shared.sys.Board

java.lang.Object
   |
   +----games.Battle.shared.sys.Board

public class Board
extends Object
Board is an abstract base class for the client and server's representations of the game board. It defines the minimal interface that the board must have in any client or server.

Constructor Index

 o Board()
Builds a generic board and fills it with cells.

Method Index

 o clearModified()
clear the modified flag for all cells on the board
 o clearTerrainModified()
clear the terrainModified flag for all cells on the board
 o getCell(int, int)
return a reference to the cell at the given row and column
 o getGrid()
Return a reference to this board's grid object
 o makeCell(int, int)
implemented in derived classes, returns an instance of a cell for a particular board class

Constructors

 o Board
  public Board()
Builds a generic board and fills it with cells. The abstract method makeCell(r,c) is called to actually obtain a cell. This method must be defined in derived classes to return a particular (client vs. server) cell type.

Methods

 o getGrid
  public Grid getGrid()
Return a reference to this board's grid object
 o makeCell
  public abstract Cell makeCell(int r,
                                int c)
implemented in derived classes, returns an instance of a cell for a particular board class
Parameters:
r - the row
c - the column
 o getCell
  public Cell getCell(int r,
                      int c)
return a reference to the cell at the given row and column
Parameters:
r - the row
c - the column
 o clearModified
  public void clearModified()
clear the modified flag for all cells on the board
 o clearTerrainModified
  public void clearTerrainModified()
clear the terrainModified flag for all cells on the board

All Packages  Class Hierarchy  This Package  Previous  Next  Index