Update method names to better match what they do
This commit is contained in:
		@@ -33,7 +33,7 @@ class Circus:
 | 
			
		||||
  def getNextColor(self):
 | 
			
		||||
    return self.wagons[self.state - 1]
 | 
			
		||||
 | 
			
		||||
  def getWagon(self):
 | 
			
		||||
  def takeWagon(self):
 | 
			
		||||
    if self.state == 0:
 | 
			
		||||
      print("Circus is not or no longer in game.")
 | 
			
		||||
      return False
 | 
			
		||||
@@ -63,15 +63,15 @@ class ConcessionCard: # name may be different in English
 | 
			
		||||
  def getRemainingPepites(self):
 | 
			
		||||
    return {1, 2, 3, 4, 5, 6, 7} - self.taken
 | 
			
		||||
 | 
			
		||||
  def getReward(self, choice):
 | 
			
		||||
  def takeReward(self, choice):
 | 
			
		||||
    if choice in self.taken:
 | 
			
		||||
      print(str(choice) + " has already been obtained.")
 | 
			
		||||
      return False
 | 
			
		||||
    self.taken.add(choice)
 | 
			
		||||
    print("Congrats! You obtained $" + str(self.pepites[choice]))
 | 
			
		||||
    return True
 | 
			
		||||
 | 
			
		||||
class Player:
 | 
			
		||||
 | 
			
		||||
  def __init__(self, color):
 | 
			
		||||
    self.color = color
 | 
			
		||||
    self.concession = ConcessionCard()
 | 
			
		||||
@@ -140,11 +140,11 @@ playersNb = 2
 | 
			
		||||
# cc = ConcessionCard()
 | 
			
		||||
# userChoice = 3
 | 
			
		||||
# print(cc.pepites)
 | 
			
		||||
# cc.getReward(userChoice - 1)
 | 
			
		||||
# cc.takeReward(userChoice - 1)
 | 
			
		||||
# print(cc.pepites)
 | 
			
		||||
# print(cc.taken)
 | 
			
		||||
# print("Remaining: " + str(cc.getRemainingPepites()))
 | 
			
		||||
# cc.getReward(userChoice - 1)
 | 
			
		||||
# cc.takeReward(userChoice - 1)
 | 
			
		||||
# print(cc.pepites)
 | 
			
		||||
# print(cc.taken)
 | 
			
		||||
# print("Remaining: " + str(cc.getRemainingPepites()))
 | 
			
		||||
@@ -153,8 +153,6 @@ playersNb = 2
 | 
			
		||||
myGame = Game()
 | 
			
		||||
myGame.initGame(playersNb)
 | 
			
		||||
myGame.printStatus()
 | 
			
		||||
myGame.concession = True
 | 
			
		||||
myGame.printStatus()
 | 
			
		||||
myGame.circus.enable()
 | 
			
		||||
myGame.printStatus()
 | 
			
		||||
print(myGame.circus.wagons)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user