C# 클래스 EricVoglBattleship.BattleshipStatisticalUtility

Utility methods
파일 보기 프로젝트 열기: solium/hacklympics

공개 메소드들

메소드 설명
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[