""" ------------------------------------------------- Project: Take-Away Standard: 91883 (AS1.7) v.1 School: Tauranga Boys' College Author: Keelan Bowmar Date: THE DATE YOU COMPLETED THE CODE Python: 3.5 ------------------------------------------------- """ # Imports import random import time # Variables player1score = 0 player2score = 0 maximumchips = 21 totalrounds = 0 # Asks for the player's names while True: print() name1 = input("What is the first player's name?") if name1.isalpha() : # This checks if it's an actual name break else: print("This is not an acceptable name. Use an actual one..") while True: name2 = input("Alright, what is the second player's name?") if name2.isalpha() : break else: print("Come on, use a proper name.") # Introduction to the game print("Hello!", name1, "and", name2, "!") time.sleep(1.5) print("PICK-UP!") time.sleep(1.5) print("Here's how the game works.") time.sleep(1.5) print("2 players will take turns picking up chips.") time.sleep(1.5) print("You can only pick up a maximum of 3 chips at a time.") time.sleep(2.0) print("Your goal is to try and be the last person who takes the final chip or chips.") time.sleep(2.5) print("Did you get all of that? Good!") time.sleep(1.5) print("Then we shall start the game!") time.sleep(1.0) # Now asks for total amount of rounds while True: try: print("Now, how many rounds would you like to play?") rounds = int(input("You can play a maximum of 5 rounds!")) if rounds < 1 or rounds > 5: print("Now choose inbetween 1 and 5") else: break except ValueError: print("Between 1 and 5..") # This prevents someone from going out of the number limit # Start of the game while rounds > 0: chips_left = maximumchips print("Rounds Left:", rounds) while chips_left > 0: # Makes it only play if there are more than 0 # Player One's Turn print("Chips Left:", chips_left) while True: try: print(name1) chips_taken = int(input("Choose how much chips you would like to take: "))