Correct translation for pepites
This commit is contained in:
parent
2fab9db01f
commit
227040e507
27
main.py
27
main.py
@ -71,19 +71,19 @@ class TreasureCard:
|
|||||||
self.state = -1 # effectively disable treasure card
|
self.state = -1 # effectively disable treasure card
|
||||||
|
|
||||||
|
|
||||||
class ConcessionCard: # name may be different in English
|
class ConcessionCard:
|
||||||
# Each card contains:
|
# Each card contains:
|
||||||
# 6 cities to connect to the player's concession. There is no need to implement those.
|
# 6 cities to connect to the player's concession. There is no need to implement those.
|
||||||
# 7 gold "pepites", as rewards when the player succefully connects a city to their concession. The player can choose
|
# 7 gold nuggets, as rewards when the player succefully connects a city to their concession. The player can choose
|
||||||
# which "pepite" to earn, and then discovers the associated reward (between 11 and 17 coins).
|
# which nugget to earn, and then discovers the associated reward (between 11 and 17 coins).
|
||||||
# A ConcessionCard is then composed of 7 pepites, with the rewards randomly distributed.
|
# A ConcessionCard is then composed of 7 nuggets, with the rewards randomly distributed.
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
availableValues = [11, 12, 13, 14, 15, 16, 17]
|
availableValues = [11, 12, 13, 14, 15, 16, 17]
|
||||||
pepitesNb = len(availableValues) - 1
|
nuggetsNb = len(availableValues) - 1
|
||||||
self.pepites = []
|
self.nuggets = []
|
||||||
for n in range(0, 7):
|
for n in range(0, 7):
|
||||||
choice = random.randint(0, pepitesNb - n)
|
choice = random.randint(0, nuggetsNb - n)
|
||||||
self.pepites.append(availableValues[choice])
|
self.nuggets.append(availableValues[choice])
|
||||||
availableValues.pop(choice)
|
availableValues.pop(choice)
|
||||||
self.taken = set()
|
self.taken = set()
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ class ConcessionCard: # name may be different in English
|
|||||||
print(str(choice) + " has already been obtained.")
|
print(str(choice) + " has already been obtained.")
|
||||||
return False
|
return False
|
||||||
self.taken.add(choice)
|
self.taken.add(choice)
|
||||||
print("Congrats! You obtained $" + str(self.pepites[choice]))
|
print("Congrats! You obtained $" + str(self.nuggets[choice]))
|
||||||
|
|
||||||
class Player:
|
class Player:
|
||||||
|
|
||||||
@ -123,6 +123,7 @@ class Game:
|
|||||||
self.players.append(Player(color))
|
self.players.append(Player(color))
|
||||||
|
|
||||||
def printStatus(self):
|
def printStatus(self):
|
||||||
|
print("")
|
||||||
print("Ticket to Ride Legacy: Legends of the West")
|
print("Ticket to Ride Legacy: Legends of the West")
|
||||||
print("")
|
print("")
|
||||||
print("Campaign - Year: " + str(self.year))
|
print("Campaign - Year: " + str(self.year))
|
||||||
@ -131,7 +132,7 @@ class Game:
|
|||||||
for player in self.players:
|
for player in self.players:
|
||||||
print(" " + player.color)
|
print(" " + player.color)
|
||||||
if self.concession:
|
if self.concession:
|
||||||
print(" Concession card remaining pepites: " + str(player.concession.getRemainingPepites()))
|
print(" Concession card remaining nuggets: " + str(player.concession.getRemainingPepites()))
|
||||||
print("")
|
print("")
|
||||||
if self.circus.state > 0:
|
if self.circus.state > 0:
|
||||||
print("Circus next sticker color: " + self.circus.getNextColor())
|
print("Circus next sticker color: " + self.circus.getNextColor())
|
||||||
@ -166,13 +167,13 @@ playersNb = 2
|
|||||||
# Test of ConcessionCard
|
# Test of ConcessionCard
|
||||||
# cc = ConcessionCard()
|
# cc = ConcessionCard()
|
||||||
# userChoice = 3
|
# userChoice = 3
|
||||||
# print(cc.pepites)
|
# print(cc.nuggets)
|
||||||
# cc.takeReward(userChoice - 1)
|
# cc.takeReward(userChoice - 1)
|
||||||
# print(cc.pepites)
|
# print(cc.nuggets)
|
||||||
# print(cc.taken)
|
# print(cc.taken)
|
||||||
# print("Remaining: " + str(cc.getRemainingPepites()))
|
# print("Remaining: " + str(cc.getRemainingPepites()))
|
||||||
# cc.takeReward(userChoice - 1)
|
# cc.takeReward(userChoice - 1)
|
||||||
# print(cc.pepites)
|
# print(cc.nuggets)
|
||||||
# print(cc.taken)
|
# print(cc.taken)
|
||||||
# print("Remaining: " + str(cc.getRemainingPepites()))
|
# print("Remaining: " + str(cc.getRemainingPepites()))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user