Skip to content

Commit

Permalink
Merge pull request #2171 from nadirhsan/patch-1
Browse files Browse the repository at this point in the history
Update main.py
  • Loading branch information
geekcomputers authored May 4, 2024
2 parents 902944d + 94855e6 commit 30dd024
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions Snake_water_gun/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,26 @@ class bcolors:
run = True
li = ["s", "w", "g"]

system("clear")
b = input(
bcolors.OKBLUE
+ bcolors.BOLD
+ "Welcome to the game 'Snake-Water-Gun'.\nWanna play? Type Y or N: "
+ bcolors.ENDC
).capitalize()

if b == "N":
run = False
print("Ok bubyeee! See you later")
elif b == "Y" or b == "y":
print(
"There will be 10 matches, and the one who wins more matches will win. Let's start."
)
while True:
system("clear")
b = input(
bcolors.OKBLUE
+ bcolors.BOLD
+ "Welcome to the game 'Snake-Water-Gun'.\nWanna play? Type Y or N: "
+ bcolors.ENDC
).capitalize()

if b == "N":
run = False
print("Ok bubyeee! See you later")
break
elif b == "Y" or b == "y":
print(
"There will be 10 matches, and the one who wins more matches will win. Let's start."
)
break
else:
continue

i = 0
score = 0
Expand Down

0 comments on commit 30dd024

Please sign in to comment.