C# Class EricVoglBattleship.Score1D

Keeps track of the number of ship position possibilities in one dimension
Afficher le fichier Open project: solium/hacklympics

Méthodes publiques

Méthode 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 méthode

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
Résultat void

Clear() public méthode

Sets the score to zero
public Clear ( ) : void
Résultat void

Initialize() public méthode

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
Résultat void

Recalculate() public méthode

Forces a recalculation of the total score
public Recalculate ( ) : void
Résultat void

Score1D() public méthode

Creates a new Score1D object
public Score1D ( ) : System.Collections.Generic
Résultat System.Collections.Generic

Sink() public méthode

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