Package be.belegkarnil.game.board.tak
Enum Class Board.Size
- All Implemented Interfaces:
Serializable,Comparable<Board.Size>,Constable
- Enclosing class:
Board
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefine a size of a huge board according to the official rulesDefine a size of a large board according to the official rulesDefine a size of a medium board according to the official rulesDefine a size of a small board according to the official rulesDefine a size of a tiny board according to the official rules -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintCount the initial capstones (depending on the board size) that a player has when the game startsintCount the initial stones (depending on the board size) that a player has when the game startsstatic Board.SizeReturns the enum constant of this class with the specified name.static Board.Size[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TINY
Define a size of a tiny board according to the official rules -
SMALL
Define a size of a small board according to the official rules -
MEDIUM
Define a size of a medium board according to the official rules -
LARGE
Define a size of a large board according to the official rules -
HUGE
Define a size of a huge board according to the official rules
-
-
Field Details
-
length
public final int lengthIs the board size
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
countInitialCapstones
public int countInitialCapstones()Count the initial capstones (depending on the board size) that a player has when the game starts- Returns:
- the number of capstones (see
Piece)
-
countInitialStones
public int countInitialStones()Count the initial stones (depending on the board size) that a player has when the game starts- Returns:
- the number of stones (see
Piece)
-