Global

Members

(constant) GameState :object

Enum of all possible game states. These are player-agnostic.
Type:
  • object
Source:

(constant) GridCellState :object

Enum of all possible states of a grid cell.
Type:
  • object
Source:

(constant) instructions :object

Enum of all possible instructions.
Type:
  • object
Source:

(constant) Player :object

Enum of all possible players.
Type:
  • object
Source:

(constant) ShipType :object

The various supported ship types, by dimension.
Type:
  • object
Source:

Methods

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

clone(obj) → {*}

Makes a deep copy of the value passed in.
Parameters:
Name Type Description
obj *
Source:
Returns:
Type
*

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

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