summaryrefslogtreecommitdiff
path: root/life2/game
diff options
context:
space:
mode:
Diffstat (limited to 'life2/game')
-rw-r--r--life2/game/board.js13
-rw-r--r--life2/game/cell.js2
-rw-r--r--life2/game/rule.js2
3 files changed, 5 insertions, 12 deletions
diff --git a/life2/game/board.js b/life2/game/board.js
index d9d508f..19c3b28 100644
--- a/life2/game/board.js
+++ b/life2/game/board.js
@@ -17,8 +17,6 @@
/**
* @fileoverview A board is a grid of cells in a certain shape and size.
- * The board is responsible for computing the next state of the game based on
- * its current state and a set of rules.
* To make the game more interesting, the board can be configured to have
* different 2D shapes (from the classic rectangle to more complex shapes like
* hexagons).
@@ -66,8 +64,9 @@ export let Grid;
/**
* A board is a grid of cells shaped after any valid 2D shape.
- * The board is responsible for computing the next state of the game based on
- * its current state and a set of rules that is passed to it.
+ * The board is only responsible for storing the cells and their state in a
+ * geometric shape. It does not apply any rules or logic to the cells, that is
+ * the responsibility of the World.
* @interface
*/
export class Board {
@@ -96,12 +95,6 @@ export class Board {
*/
getNeighbors(x, y) {}
/**
- * Calculate the next state of the board based on a set of rules.
- * @param {!Array<!Rule>} rules The rules to apply to the board.
- * @abstract
- */
- calculateNextState(rules) {}
- /**
* Check if a position is out of bounds.
* @param {number} x The x position of the cell.
* @param {number} y The y position of the cell.
diff --git a/life2/game/cell.js b/life2/game/cell.js
index cd5274f..c5f13ec 100644
--- a/life2/game/cell.js
+++ b/life2/game/cell.js
@@ -18,7 +18,7 @@
/**
* @fileoverview Implementation of a cell in the Life2 game.
* Cells are the smallest unit of the game, they carry information about their
- * aliveness and their team, but everything else is computed by the board
+ * aliveness and their team, but everything else is computed by the game World
* (interactions, changes, ...).
*
* @package life2
diff --git a/life2/game/rule.js b/life2/game/rule.js
index ee723db..19e32f4 100644
--- a/life2/game/rule.js
+++ b/life2/game/rule.js
@@ -20,7 +20,7 @@
* the next state of a cell based on its current state within a board.
* Rules are functions that either return a new cell state, or nothing if they
* don't apply to the cell.
- * The final choice for a cell state is made by the board, using all the results
+ * The final choice for a cell state is made by the World, using all the results
* from the multiple rules being applied to the cell.
*
* @package life2