Home Reference Source Demo Test

Typedef

Static Public Summary
public
public
public
public
public

Static Public

public orientation: Object source

Properties:

NameTypeAttributeDescription
columnFactor number

0 for vertical, 1 for horizontal

rowFactor number

0 for horizontal, 1 for vertical

public orientations: Object source

Properties:

NameTypeAttributeDescription
horizontal orientation
vertical orientation

public parameters: Object source

Properties:

NameTypeAttributeDescription
numRows number

number of rows on the board

numColumns number

number of columns on the board

shipTypes shipTypes

object of all shiptypes

orientations orientations

object of orientations

totalCount number

total number of ships

Test:

public shipType: Object source

Properties:

NameTypeAttributeDescription
shipTypeId number

1 = Aircraft Carrier, 2 = Battleship, 3 = Cruiser, 4 = Destroyer, 5 = Submarine

name string

Aircraft Carrier | Battleship | Cruiser | Destroyer | Submarine

length number

length of ship

count number

number of this ship type on the board

color string

ansi (chalk) color used in tile.toString()

backgroundColor string

HTML color used in tile.toHtml()

public shipTypes: Object source

Properties:

NameTypeAttributeDescription
1 shipType

Aircraft Carrier

2 shipType

Battleship

3 shipType

Cruiser

4 shipType

Destroyer

5 shipType

Submarine