Enum Class Board.Size

java.lang.Object
java.lang.Enum<Board.Size>
be.belegkarnil.game.board.tak.Board.Size
All Implemented Interfaces:
Serializable, Comparable<Board.Size>, Constable
Enclosing class:
Board

public static enum Board.Size extends Enum<Board.Size>
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Define a size of a huge board according to the official rules
    Define a size of a large board according to the official rules
    Define a size of a medium board according to the official rules
    Define a size of a small board according to the official rules
    Define a size of a tiny board according to the official rules
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    Is the board size
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Count the initial capstones (depending on the board size) that a player has when the game starts
    int
    Count the initial stones (depending on the board size) that a player has when the game starts
    static Board.Size
    Returns the enum constant of this class with the specified name.
    static Board.Size[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • TINY

      public static final Board.Size TINY
      Define a size of a tiny board according to the official rules
    • SMALL

      public static final Board.Size SMALL
      Define a size of a small board according to the official rules
    • MEDIUM

      public static final Board.Size MEDIUM
      Define a size of a medium board according to the official rules
    • LARGE

      public static final Board.Size LARGE
      Define a size of a large board according to the official rules
    • HUGE

      public static final Board.Size HUGE
      Define a size of a huge board according to the official rules
  • Field Details

    • length

      public final int length
      Is the board size
  • Method Details

    • values

      public static Board.Size[] 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

      public static Board.Size valueOf(String name)
      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 name
      NullPointerException - 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)