Skip to content

Commit b6d8848

Browse files
committed
updated logic so game ends instantly upon completing round 5
1 parent 2914b85 commit b6d8848

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

FLASK PROJECTS/Math Game/game.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ def main():
4949
if user_answer == answer:
5050
points += max(0, 5 - int(time_taken)) # Maximum bonus: 5 points
5151
print(f"Round {round_number} over! Total points: {points}")
52-
if round_number != 5:
53-
print(f"Next round starts in 3 seconds...")
52+
if round_number < 5:
5453
time.sleep(3)
55-
round_number += 1
56-
num_integers += 1 # Increase number of integers for the next round
57-
else: print(f"Game complete! Total points: {points}")
54+
round_number += 1
55+
num_integers += 1 # Increase number of questions for the next round
5856

5957
print("Thanks for playing!")
6058

0 commit comments

Comments
 (0)