def test_determination_of_the_winner(): assert determine_winner("rock", "rock") == None assert determine_winner("rock", "paper") == "paper" assert determine_winner("rock", "scissors") == "rock" assert determine_winner("paper", "rock") == "paper" assert determine_winner("paper", "paper") == None assert determine_winner("paper", "scissors") == "scissors" assert determine_winner("scissors", "rock") == "rock" assert determine_winner("scissors", "paper") == "scissors" assert determine_winner("scissors", "scissors") == None
OPTIONS = ["rock", "paper", "scissors"] if __name__ == "__main__": print("-------------------") print("WELCOME TO MY ROCK-PAPER-SCISSORS GAME!!") print(f"PLAYER: '{USER_NAME}'") print("-------------------") print("PLEASE SELECT ONE OF THE FOLLOWING OPTIONS:", OPTIONS) print("-------------------") user_choice = "rock" # TODO: accept user input print(f"YOU CHOSE: '{user_choice}'") computer_choice = random.choice(OPTIONS) print(f"COMPUTER CHOSE: '{computer_choice}'") winning_choice = determine_winner(user_choice, computer_choice) print(f"WINNING CHOICE: '{winning_choice}'") print("-------------------") print("THANKS, PLEASE PLAY AGAIN!") print("-------------------") #breakpoint() #print(dir(random)) #print(help(random.choice)) # then press "q" to quit #print(type(options)) #print(type(user_choice))