## Uses of Class
edu.wisc.game.sql.Piece.Color

- Packages that use Piece.Color
  Package | Description
  --- | ---
  edu.wisc.game.engine | Top-level Game Server code
  edu.wisc.game.rest | The RESTful web API
  edu.wisc.game.sql | Persistent data structures

- - ### Uses of Piece.Color in edu.wisc.game.engine

    Fields in edu.wisc.game.engine declared as Piece.Color
    Modifier and Type | Field | Description
    --- | --- | ---
    `Piece.Color[]` | RuleSet.Atom.`colors` | For shape-and-color pieces, determines acceptable colors.

    Methods in edu.wisc.game.engine that return types with arguments of type Piece.Color
    Modifier and Type | Method | Description
    --- | --- | ---
    `HashSet<Piece.Color>` | RuleSet.`listAllColors()` | Lists all colors used in this rule set.

  - ### Uses of Piece.Color in edu.wisc.game.rest

    Fields in edu.wisc.game.rest declared as Piece.Color
    Modifier and Type | Field | Description
    --- | --- | ---
    `Piece.Color[]` | ParaSet.`colors` |

    Methods in edu.wisc.game.rest that return Piece.Color
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Piece.Color[]` | ParaSet.`parseColors​(String val)` |

    Methods in edu.wisc.game.rest with parameters of type Piece.Color
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | ColorMap.`getHex​(Piece.Color color, boolean brighten)` |
    `boolean` | ColorMap.`hasColor​(Piece.Color color)` |

  - ### Uses of Piece.Color in edu.wisc.game.sql

    Fields in edu.wisc.game.sql declared as Piece.Color
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Piece.Color` | Piece.Color.`BLACK` |
    `static Piece.Color` | Piece.Color.`BLUE` |
    `static Piece.Color[]` | Piece.Color.`legacyColors` | The four original colors, inherited from Game Engine 1.0, and used for compatibility with old trial list files.
    `static Piece.Color` | Piece.Color.`RED` |
    `static Piece.Color` | Piece.Color.`YELLOW` |

    Methods in edu.wisc.game.sql that return Piece.Color
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Piece.Color` | Piece.Color.`findColor​(String s)` |
    `Piece.Color` | Piece.`xgetColor()` |

    Methods in edu.wisc.game.sql with parameters of type Piece.Color
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | Piece.`setColor​(Piece.Color x)` | This is how it used by our JsonToJava, when reading board files

    Constructors in edu.wisc.game.sql with parameters of type Piece.Color
    Constructor | Description
    --- | ---
    `Board​(int randomCnt, int nShapes, int nColors, Piece.Shape[] allShapes, Piece.Color[] allColors)` | The main constructor for a random initial board in GS 2.*.
    `Game​(RuleSet _rules, int _randomObjCnt, int _nShapes, int _nColors, Piece.Shape[] _allShapes, Piece.Color[] _allColors)` | A game with shape-and-color objects used as game pieces
    `Game​(RuleSet _rules, int _randomObjCnt, Piece.Shape[] _allShapes, Piece.Color[] _allColors)` |
    `Piece​(Piece.Shape _shape, Piece.Color _color, int _x, int _y)` |
    `RandomGameGenerator​(File ruleSetFile, int[] _nPiecesRange, int[] _nShapesRange, int[] _nColorsRange, Piece.Shape[] _allShapes, Piece.Color[] _allColors)` |