import random import time class Player: def __init__(self, name, balance): self.name = name self.balance = balance def play_game(player): player = input("Before starting this game and giving me all your money.. please tell me your name. ") input("What a weird name") time.sleep(1) print("But anyway.... Welcome to Rock, Paper, Scissors!.... Are you prepared to meet your doom? ") choices = ['rock', 'paper', 'scissors'] while True: player_choice = input("Enter your choice (rock/paper/scissors): ").lower() if player_choice not in choices: print("Invalid choice. Please choose again.") continue computer_choice = random.choice(choices) print("Computer chooses:", computer_choice) if player_choice == computer_choice: print("It's a tie!") elif (player_choice == 'rock' and computer_choice == 'scissors') or \ (player_choice == 'paper' and computer_choice == 'rock') or \ (player_choice == 'scissors' and computer_choice == 'paper'): print("Congratulations! You win!") else: print("Computer wins!") play_again = input("Do you want to play again? (yes/no): ").lower() if play_again != 'yes': break if __name__ == "__main__": play_game()