Skip to content

Instantly share code, notes, and snippets.

@Raj39120
Created April 30, 2020 13:42
Show Gist options
  • Save Raj39120/34bcd7a00c0f09bd2a7b1c1dc1cfe8f9 to your computer and use it in GitHub Desktop.
Save Raj39120/34bcd7a00c0f09bd2a7b1c1dc1cfe8f9 to your computer and use it in GitHub Desktop.
def game():
player_1 = input("Enter your choice over here player 1 ('rock', 'paper', or 'scissors'): ")
if player_1 != "rock":
if player_1 != "paper":
if player_1 != "scissors":
print("You have not entered a valid choice. Please start the game again.")
return
for i in range(0, 1000000):
if i == 984353:
print("Didn't I say no cheating!!! You can't see it anyways, so scroll down and continue playing fairly!!!")
print(i),
print("DO NOT SCROLL UP AND LOOK AT PLAYER 1'S CHOICE AND CHEAT!!!")
player_2 = input("Enter your choice over here player 2 ('rock', 'paper', or 'scissors'): ")
if player_2 != "rock":
if player_2 != "paper":
if player_2 != "scissors":
print("You have not entered a valid choice. Please start the game again.")
return
if player_1 == "rock":
pass
if player_1 == "paper":
pass
if player_1 == "scissors":
pass
if player_2 == "rock":
pass
if player_2 == "paper":
pass
if player_2 == "scissors":
pass
if player_1 == "rock" and player_2 == "paper":
print("Player 2 has won because paper beats rock. Do you want to play again?")
choice = input("If you want to play again enter 1 over here, if not enter 0: ")
if choice == 1:
game()
if choice == 0:
return
else:
print("You have not entered a valid choice so we will end the game.")
if player_1 == "rock" and player_2 == "scissors":
print("Player 1 has won because rock beats scissors. Do you want to play again?")
choice = input("If you want to play again enter 1 over here, if not enter 0: ")
if choice == 1:
game()
if choice == 0:
return
else:
print("You have not entered a valid choice so we will end the game.")
if player_1 == "rock" and player_2 == "rock":
print("This match was a tie since both players chose rock. Do you want to play again?")
choice = input("If you want to play again enter 1 over here, if not enter 0: ")
if choice == 1:
game()
if choice == 0:
return
else:
print("You have not entered a valid choice so we will end the game.")
if player_1 == "paper" and player_2 == "rock":
print("Player 1 has won because paper beats rock. Do you want to play again?")
choice = input("If you want to play again enter 1 over here, if not enter 0: ")
if choice == 1:
game()
if choice == 0:
return
else:
print("You have not entered a valid choice so we will end the game.")
if player_1 == "paper" and player_2 == "scissors":
print("Player 2 has won because scissors beats paper. Do you want to play again?")
choice = input("If you want to play again enter 1 over here, if not enter 0: ")
if choice == 1:
game()
if choice == 0:
return
else:
print("You have not entered a valid choice so we will end the game.")
if player_1 == "paper" and player_2 == "paper":
print("This match was a tie since both players chose rock. Do you want to play again?")
choice = input("If you want to play again enter 1 over here, if not enter 0: ")
if choice == 1:
game()
if choice == 0:
return
else:
print("You have not entered a valid choice so we will end the game.")
if player_1 == "scissors" and player_2 == "rock":
print("Player 2 has won because rock beats scissors. Do you want to play again?")
choice = input("If you want to play again enter 1 over here, if not enter 0: ")
if choice == 1:
game()
if choice == 0:
return
else:
print("You have not entered a valid choice so we will end the game.")
if player_1 == "scissors" and player_2 == "paper":
print("Player 1 has won because scissors beats paper. Do you want to play again?")
choice = input("If you want to play again enter 1 over here, if not enter 0: ")
if choice == 1:
game()
if choice == 0:
return
else:
print("You have not entered a valid choice so we will end the game.")
if player_1 == "scissors" and player_2 == "scissors":
print("This match was a tie since both players chose rock. Do you want to play again?")
choice = input("If you want to play again enter 1 over here, if not enter 0: ")
if choice == 1:
game()
if choice == 0:
return
else:
print("You have not entered a valid choice so we will end the game.")
game()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment