C# Class MBC.Controllers.SimpleBot_3_0_0

Inheritance: MBC.Shared.Util.Controller2
Exibir arquivo Open project: aiclub/Mohawk_Battleship

Protected Methods

Method Description
Initialize ( ) : void

Hooks required events.

Private Methods

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 ( Event ev ) : void
moveShotToHuntingList ( Coordinates shot ) : void

Finds and removes a shot from the shot List and adds it to the hunting list

moveShotToHuntingList ( List shots ) : void

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 ( Event ev ) : void
populateShotList ( ) : void

Populate our list of shot coordinates

roundBeginEvent ( Event ev ) : void
shipHitEvent ( Event ev ) : void
shoot ( Coordinates shot ) : void

Takes coordinates and shoots at them

turnStart ( ) : void

It is our turn, fire!

Method Details

Initialize() protected method

Hooks required events.
protected Initialize ( ) : void
return void