Members
(static, constant) GameState :object
Enum of all possible game states. These are player-agnostic.
Type:
- object
- Source:
(static, constant) GridCellState :object
Enum of all possible states of a grid cell.
Type:
- object
- Source:
(static, constant) Player :object
Enum of all possible players.
Type:
- object
- Source:
(static, constant) ShipType :object
The various supported ship types, by dimension.
Type:
- object
- Source:
Methods
(static) appUrl(path) → {string}
Generate an absolute URL to a file w/in the project directory.
Parameters:
Name | Type | Description |
---|---|---|
path |
string |
- Source:
Returns:
- Type
- string
(static) clone(obj) → {*}
Makes a deep copy of the value passed in.
Parameters:
Name | Type | Description |
---|---|---|
obj |
* |
- Source:
Returns:
- Type
- *
(static) isShipCell(grid_cell_state) → {boolean}
Returns true if the given grid cell state represents a ship in some way.
Parameters:
Name | Type | Description |
---|---|---|
grid_cell_state |
GridCellState |
- Source:
Returns:
- Type
- boolean
(static) isValidTargetCell(grid_cell_state) → {boolean}
Returns true if the given grid cell state can be fired upon.
Parameters:
Name | Type | Description |
---|---|---|
grid_cell_state |
GridCellState |
- Source:
Returns:
- Type
- boolean