C# Class EricVoglBattleship.BattleshipStatisticalUtility

Utility methods
Afficher le fichier Open project: solium/hacklympics

Méthodes publiques

Méthode Description
PositionPossibilities ( int index, int length, List ships ) : int

Determines the number of possible ship orientations of a given size in a given 1D space at a given position in that space

PositionPossibilities ( int index, int length, int size ) : int

Determines the number of possible ship orientations of a given size in a given 1D space at a given position in that space

ShipPossibilityMatrix ( int width, int height, List ships ) : ].Score2D[

Populates a matrix with number of ship position possibilities in each row/column (divided by ship type and orientation)

ShipPossibilityMatrix ( int width, int height, List ships, int &totalPositions ) : ].int[

Populates a matrix with number of ship position possibilities in each row/column

Method Details

PositionPossibilities() public static méthode

Determines the number of possible ship orientations of a given size in a given 1D space at a given position in that space
public static PositionPossibilities ( int index, int length, List ships ) : int
index int position in 1D space
length int size of 1D space
ships List ships in 1D space
Résultat int

PositionPossibilities() public static méthode

Determines the number of possible ship orientations of a given size in a given 1D space at a given position in that space
public static PositionPossibilities ( int index, int length, int size ) : int
index int position in 1D space
length int size of 1D space
size int
Résultat int

ShipPossibilityMatrix() public static méthode

Populates a matrix with number of ship position possibilities in each row/column (divided by ship type and orientation)
public static ShipPossibilityMatrix ( int width, int height, List ships ) : ].Score2D[
width int Width of board
height int Height of board
ships List Ships in play
Résultat ].Score2D[

ShipPossibilityMatrix() public static méthode

Populates a matrix with number of ship position possibilities in each row/column
public static ShipPossibilityMatrix ( int width, int height, List ships, int &totalPositions ) : ].int[
width int Width of board
height int Height of board
ships List Ships in play
totalPositions int Total position possibilities
Résultat ].int[