java.lang.Object
Model.gameClasses.Tile.Bag
- Enclosing class:
Tile
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTileToBag(char c) static Tile.BaggetBag()int[]getRand()getTile(char c) getTileToWord(char c) voidintsize()
-
Field Details
-
letters
public int[] letters -
originalAmountOfLetters
public int[] originalAmountOfLetters -
scores
public int[] scores -
tiles
-
totalTiles
public int totalTiles
-
-
Method Details
-
getRand
- Returns:
- a random tile from the bag
-
getTile
- Parameters:
c- an alphabetic letter- Returns:
- a tile that represents the given letter
-
addTileToBag
public void addTileToBag(char c) -
getTileToWord
-
put
- 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
- Returns:
- the bag - Singleton
-