""" ------------------------------------------------- Project: Take-Away Game Standard: 91883 (AS1.7) v.1 School: Tauranga Boys' College Author: Shreshth Tyagi Date: 10th March 2025 Python: 3.5 ------------------------------------------------- """ # Check if the user has entered a name from curses import endwin from doctest import OutputChecker import time from tracemalloc import start import random from pygame import GL_ACCUM_RED_SIZE import pygame print "what is your name?" # type: ignore print("Hello Jim, it is now time to guess a number") time.guess(10) print("First guess equals 12"): # type: ignore else "Guess equals wrong" # type: ignore print "what is your name?" # type: ignore print("Hello Jim, it is now time to guess a number second time") time.guess(10) print("First guess equals 13"): # type: ignore else "Guess equals wrong" # type: ignore print "what is your name?" # type: ignore print("Hello Matt, it is now time to guess a number") time.guess(10) print("First guess equals 9"): # type: ignore else "Guess equals wrong" # type: ignore print "what is your name?" # type: ignore print("Hello Matt, it is now time to guess a number second time") time.guess(8) print("First guess equals 9"): # type: ignore else "Guess equals wrong" # type: ignore print "what is your name?" # type: ignore print("Hello Michael, it is now time to guess a number") time.guess(5) print("First guess equals 5") else "Guess equals correct!" # type: ignore print feedback("Congratulations Michael for winning the game!") # type: ignore set # type: ignore reset_guesses = 0 rounds = 3 user_score = 0 AI_score = 0 round_won = True round = 1 show game title # type: ignore ask player name # type: ignore welcome user and explain game # type: ignore start of rounds loop # type: ignore set random Number # type: ignore round_win = False guesses = guesses_reset # type: ignore output current round # type: ignore output current score # type: ignore start of guess loop # type: ignore user guesses number # type: ignore Player choice # type: ignore Incorrect # type: ignore 10 guess +1 AI_score # type: ignore OutputChecker pygame scores # type: ignore endwin