C# Класс EricVoglBattleship.BattleshipStatisticalUtility

Utility methods
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

PositionPossibilities() публичный статический Метод

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
Результат int

PositionPossibilities() публичный статический Метод

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
Результат int

ShipPossibilityMatrix() публичный статический Метод

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
Результат ].Score2D[

ShipPossibilityMatrix() публичный статический Метод

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
Результат ].int[