To be more specific been trying to code a frog and toad game. Most of the code works however can not seem to get python to display when the user has won the game. Feel free to ask for any added information.
frogandtoad= ['f','f','f',' ', 't','t','t']
def game_won():
for i in range(0,3):
if frogandtoad[i] =='f':
frog = True
if frogandtoad[i]=='t':
toad = True
if frog == True and toad == True:
return True
def playgame(frogandtoad):
print("From: ")
from_pos = int(input()) - 1
print("To: ")
to_pos = int(input())-1 #Bring in valid_move
valid = valid_move(frogandtoad, from_pos, to_pos)
if valid:
value = frogandtoad[from_pos]
frogandtoad[to_pos] = value
frogandtoad[from_pos] = ' '
print("frogandtoad panel", frogandtoad)
else:
print("Invalid Move, Look at rules under demonstration!")
if game_won():
print("you won")
exit_game()