Class HexColor

java.lang.Object
spinhex.model.HexColor

public final class HexColor extends Object
Represents the available colors for hexagonal tiles in the SpinHex game.

For performance and memory efficiency, the colors are represented as single-byte values.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
    Represents a blue colored tile.
    static final byte
    Represents a green colored tile.
    static final byte
    Represents an empty tile, logically equivalent to null.
    static final byte
    Represents a red colored tile.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NONE

      public static final byte NONE
      Represents an empty tile, logically equivalent to null. This is used to indicate that a hexagonal tile is not occupied by any color.
      See Also:
    • RED

      public static final byte RED
      Represents a red colored tile.
      See Also:
    • GREEN

      public static final byte GREEN
      Represents a green colored tile.
      See Also:
    • BLUE

      public static final byte BLUE
      Represents a blue colored tile.
      See Also:
  • Constructor Details

    • HexColor

      public HexColor()