# CSIS 1595 - Lab 2 DUE: 10/11/2023
# author: (your full name)

# please rename this sourcecode file like "username_1595_lab2.py"
# using your email username, e.g.: username@student.ysu.edu
# submit via email attachment to: james.dittrich+YSU@gmail.com

import random

def showMenu():
	choices = ["Rock","Paper","Scissors","Lizard","Spock"]
	count = 1
	for item in choices:
		print(str(count) + ". " + item)
		count += 1
	return

def showRules():
	# show the rules
	print("\n****************************************************")
	print("* Welcome to Rock, Paper, Scissors, Lizard, Spock. *")
	print("****************************************************")
	print("\nThe rules are simple:")
	print("- Scissors cut Paper")
	print("- Rock crushes Lizard")
	print("- Paper covers Rock")
	print("- Lizard poisons Spock")
	print("- Spock smashes Scissors")
	print("- Scissors decapitate Lizard")
	print("- Lizard eats Paper")
	print("- Paper disproves Spock")
	print("- Spock vaporizes Rock")
	print("- Rock breaks Scissors")
	return

### MAIN PROGRAM STARTS HERE ###

done = False;
choices = ["Rock","Paper","Scissors","Lizard","Spock"]
playerScore = 0
playerChoice = 0
opponentScore = 0
opponentChoice = 0
replay = "n" # prompt for (y/n) answer

# game loop
while(not done):
	# TODO: reset the scores when playing again

	showRules()

	# TODO: best out of 5 turn loop
	while(playerScore < 3 and opponentScore < 3):

		# TODO: input loop starts here
		# print the choices as a numbered list (1-5)
		showMenu()
		# TODO: prompt for input
		# TODO: loop until input is a valid number (1-5)

		# visually confirm the chosen symbol
		print("You chose: ") # TODO: finish (use the list!)

		# TODO: generate a random response for the opponent (0-4)
		print("Your opponent chose: ") # TODO: finish (use the list!)

		# TODO: Evaluate the outcome and print out the correct message (from above)
		# TODO: Increment the score of a winning player
		# HINT: Write a nested conditional to evaluate the outcome.
		#       You may have TIES when both players select the same symbol.

		print("Player score:", playerScore)
		print("Opponent score:", opponentScore)
	# best of 5 game loop ends here.

	# TODO: Print out who won.
	# TODO: Prompt the user to replay (y/n) to toggle "done".
# replay loop ends here.
print("Thank you for playing.\n")
