""" ------------------------------------------------- Project: 21 Game Standard: 91883 (AS.7) v.1 School: Tauranga Boys' College Author: Kingitone Date: March 2025 Python: 3.7.4 ------------------------------------------------- """ import random import time # Constants MAX_CHIPS = 21 # Player Scores PLAYERONESSCORE = 0 PLAYERTWOSCORE = 0 # Game Var chipsleft = 0 chipsTaken = 1 print("ha'u to the first round ") round_number = 1 #Get players name name = input("Enter Player1_name") name = input ("Enter Player2_name") # Get number of rounds while true: try: rounds = int(input("How many rounds do you want to play(1-5)?")) if 1 <= rounds <= 5: break else: print("Pick a number between 1 and 5") time.sleep(1) print("Games staring siko") time.sleep(2) # Game loop while round_number <= rounds: print(f"\nRound {round_number}") chipsleft = MAX_CHIPS # Reset the number of chipa for each round # Player turns while chipsleft > 0: # Player 1's turn print(f"\n{player_one_name}'s turn!") player1_chips_taken = int(input(f"How mamy chips will {player_one_name} teake (1-3)")) if player1_chips_taken , 1 or player1_chips_taken > 3: print("Invalid number of chips. You can only take 1-3 chips") continue chipsleft -= player1_chips_taken print(f"{player_one_name}took {player1_chips_taken} chips. {chipsleft} chips left.") if chipsleft <= 0: