Skip to content
Snippets Groups Projects

Bringing New Stuff to Master

Merged Raymond Tu requested to merge newStuff into master
17 files
+ 709
1780
Compare changes
  • Side-by-side
  • Inline
Files
17
+ 2
6
@@ -6,10 +6,7 @@ from random import shuffle
# @brief This method implements the back end model of the bag for the Scrabble game.
# @date Feb.15,2020
class Bag:
"""
Creates the bag of all tiles that will be available during the game. Contains 98 letters and two blank tiles.
Takes no arguments to initialize.
"""
## @brief initializes the bag model by calling the initBag() method, which adds the default 100 tiles to the bag.
def __init__(self):
self.bag = []
@@ -19,7 +16,6 @@ class Bag:
# @param1 a tile object that represents the letter tile.
# @param2 the number of tiles being added to the back.
def addToBag(self, tile, numOfTiles):
for i in range(numOfTiles):
self.bag.append(tile)
@@ -62,4 +58,4 @@ class Bag:
## @brief Returns the number of tiles left in the bag.
# @return Number of tiles left in the bag.
def getRemainingTiles(self):
return len(self.bag)
\ No newline at end of file
return len(self.bag)
Loading