Class: Area

Area(type, dimension, ships)

Area

Constructor

new Area(type, dimension, ships)

Parameters:
Name Type Description
type string This defines the type of the ship "P" & "Q"
dimension Array Represnts the dimension of the area
ships Array Represnts the ships for a player
Source:

Methods

decrementShipCount() → {null}

Function to decremen the ship count
Source:
Returns:
returns nothing
Type
null

isAreaDestroyed() → {Boolean}

Function to check if the area is destroyed
Source:
Returns:
returns true if area is destroyed else false
Type
Boolean