C# Class EricVoglBattleship.Score1D

Keeps track of the number of ship position possibilities in one dimension
显示文件 Open project: solium/hacklympics

Public Methods

Method Description
Apply ( List ships, int index, int length ) : void

Applies possibilities in 1D

Clear ( ) : void

Sets the score to zero

Initialize ( List ships, int index, int length ) : void

Initializes possibilities in 1D

Recalculate ( ) : void

Forces a recalculation of the total score

Score1D ( ) : System.Collections.Generic

Creates a new Score1D object

Sink ( int size ) : void

Update possible positions knowning ship sank

Method Details

Apply() public method

Applies possibilities in 1D
public Apply ( List ships, int index, int length ) : void
ships List Ships alive
index int index in length
length int length
return void

Clear() public method

Sets the score to zero
public Clear ( ) : void
return void

Initialize() public method

Initializes possibilities in 1D
public Initialize ( List ships, int index, int length ) : void
ships List Ships alive
index int index in length
length int length
return void

Recalculate() public method

Forces a recalculation of the total score
public Recalculate ( ) : void
return void

Score1D() public method

Creates a new Score1D object
public Score1D ( ) : System.Collections.Generic
return System.Collections.Generic

Sink() public method

Update possible positions knowning ship sank
public Sink ( int size ) : void
size int Size of ship that sank
return void