Models - STEP-tw/battleship-phoenix GitHub Wiki
1.POSITION SYSTEM
data:
behaviors:
* getAllCoordinates(direction,initial position,size)
2.SHIP
data:
* direction
* size
* head position
* position of damage
behaviors:
* isHit()
* getHealth()
* hasSunk()
* recordDamagePosition()
3. FLEET
data:
* ships
behaviors:
* addShip()
* isAnyShipHit()
* hasAnyActiveShip()
* getActiveShipsCount()
* updateShipStatus()
4. PLAYER
data:
* fleet
* shots
behaviours:
* addShip()
* hasWon()
5. GAME
data:
* players
* current player
behaviours:
* addPlayer()
* getPlayerCount()