Skip to content

Commit 2969388

Browse files
authored
Merge pull request #75 from Rediiel/AuctionUp
2 parents a154b9a + 775050e commit 2969388

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Games/auction/auction.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,17 @@ def calcBid(players):
4444
clear()
4545

4646
print(logo)
47-
# Adds player
47+
48+
#Add player
4849
bidding = True
4950
while bidding:
50-
name = input("Enter your name\n")
51+
name = input("Enter your name\n")
52+
53+
54+
if name in players:
55+
print("This name is already taken")
56+
continue
57+
5158
while True:
5259
bidAmount = input("Enter the bidding amount\n$")
5360
if bidAmount.isdigit():
@@ -61,7 +68,6 @@ def calcBid(players):
6168

6269
players[name] = bidAmount
6370

64-
6571
cont = (input("Add another player?\nEnter 'Yes' or 'No'\n")).lower()
6672

6773
clear()
@@ -71,4 +77,4 @@ def calcBid(players):
7177
if cont == "no":
7278
bidding = False
7379

74-
calcBid(players)
80+
calcBid(players)

0 commit comments

Comments
 (0)