Class Tile.Bag

java.lang.Object
Model.gameClasses.Tile.Bag
Enclosing class:
Tile

public static class Tile.Bag extends Object
  • Field Details

    • letters

      public int[] letters
    • originalAmountOfLetters

      public int[] originalAmountOfLetters
    • scores

      public int[] scores
    • tiles

      public Tile[] tiles
    • totalTiles

      public int totalTiles
  • Method Details

    • getRand

      public Tile getRand()
      Returns:
      a random tile from the bag
    • getTile

      public Tile getTile(char c)
      Parameters:
      c - an alphabetic letter
      Returns:
      a tile that represents the given letter
    • addTileToBag

      public void addTileToBag(char c)
    • getTileToWord

      public Tile getTileToWord(char c)
    • put

      public void put(Tile t)
      Parameters:
      t - return a tile to the bag
    • size

      public int size()
      Returns:
      the total amount of tiles in the bag
    • getQuantities

      public int[] getQuantities()
      Returns:
      an amounts array of the tiles in the bag
    • getBag

      public static Tile.Bag getBag()
      Returns:
      the bag - Singleton