コード例 #1
0
 /**
  * Setup the board game size.
  *
  * @param rows
  * @param cols
  */
 public void setupBoard(int rows, int cols) {
   if (board == null) {
     board = new LifeAndDeathBoard();
   }
   board.setRows(rows);
   board.setCols(cols);
 }
コード例 #2
0
 /** Advances the current generation to the next. */
 public void advanceGeneration() {
   board.advanceGeneration();
 }
コード例 #3
0
 /** Starts a new game. */
 public void startGame() {
   if (board == null) {
     board = new LifeAndDeathBoard();
   }
   board.startGame();
 }