Method | Description | |
---|---|---|
Initialize ( ) : void |
Hooks required events.
|
Method | Description | |
---|---|---|
getNextHuntingShot ( ) : Coordinates |
Take a shot from the hunting list
|
|
getNextShot ( ) : Coordinates |
Get the next shot, from the hunting list if available, randomly if not
|
|
getSurroundingShots ( Coordinates shot ) : List |
Creates a list of Coordinates surrounding those provided Does not validate to ensure they are within the bounds of the grid
|
|
hit ( Coordinates coords, bool sunk ) : void |
We have hit an enemy ship
|
|
initializeHuntingList ( ) : void |
Create a fresh hunting list
|
|
matchBeginEvent ( |
||
moveShotToHuntingList ( Coordinates shot ) : void |
Finds and removes a shot from the shot List and adds it to the hunting list
|
|
moveShotToHuntingList ( List |
Remove a list of shots from the shot list and add them to the hunting list
|
|
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 ( |
||
populateShotList ( ) : void |
Populate our list of shot coordinates
|
|
roundBeginEvent ( |
||
shipHitEvent ( |
||
shoot ( Coordinates shot ) : void |
Takes coordinates and shoots at them
|
|
turnStart ( ) : void |
It is our turn, fire!
|