Метод | Описание | |
---|---|---|
Initialize ( ) : void |
Hooks required events.
|
Метод | Описание | |
---|---|---|
RandomCoordinates ( ) : Coordinates |
This method generates a random set of coordinates within the match field boundaries.
|
|
findRandomShot ( ) : Coordinates |
Iterate over shot map until an available location is found
|
|
initializeShotMap ( ) : void |
Reset our shotMap to represent a fresh game map
|
|
matchBeginEvent ( |
||
newMatch ( ) : void |
A new match has begun
|
|
newRound ( ) : void |
A new round has begun, place our ships and prepare to fire!
|
|
placeShips ( ) : void |
Place ships in specific locations
|
|
playerTurnBeginEvent ( |
||
roundBeginEvent ( |
||
shoot ( Coordinates shot ) : void |
Takes coordinates and shoots at them
|
|
turnStart ( ) : void |
It is our turn, fire!
|