Test and fix Circus disablement
This commit is contained in:
parent
d2a58a0392
commit
496f83129c
@ -39,7 +39,7 @@ class Circus:
|
|||||||
return False
|
return False
|
||||||
print("Player obtained a " + self.wagons[self.state - 1] + " circus sticker!")
|
print("Player obtained a " + self.wagons[self.state - 1] + " circus sticker!")
|
||||||
self.state = self.state + 1
|
self.state = self.state + 1
|
||||||
if self.state == len(self.wagons) - 1:
|
if self.state > len(self.wagons):
|
||||||
print("Circus stickers are now depleted.")
|
print("Circus stickers are now depleted.")
|
||||||
self.state = 0 # effectively disable circus
|
self.state = 0 # effectively disable circus
|
||||||
|
|
||||||
@ -154,5 +154,11 @@ myGame = Game()
|
|||||||
myGame.initGame(playersNb)
|
myGame.initGame(playersNb)
|
||||||
myGame.printStatus()
|
myGame.printStatus()
|
||||||
myGame.circus.enable()
|
myGame.circus.enable()
|
||||||
|
myGame.circus.state = 19
|
||||||
myGame.printStatus()
|
myGame.printStatus()
|
||||||
print(myGame.circus.wagons)
|
print(myGame.circus.wagons)
|
||||||
|
myGame.circus.takeWagon()
|
||||||
|
myGame.printStatus()
|
||||||
|
print(myGame.circus.wagons)
|
||||||
|
myGame.circus.takeWagon()
|
||||||
|
myGame.printStatus()
|
||||||
|
Loading…
Reference in New Issue
Block a user