def simulate_play_outcome(play_choice): global down, yard_line, score if play_choice == "1": # Simulate a pass play outcome = random.randint(-5, 15) yard_line += outcome print(f"You passed for {outcome} yards.") if outcome < 0: down += 1 print("The pass was incomplete. Down incremented.") elif yard_line >= 100: score += 6 yard_line = 20 down = 1 print("Touchdown! You scored 6 points.") elif play_choice == "2": # Simulate a run play outcome = random.randint(-2, 8) yard_line += outcome print(f"You ran for {outcome} yards.") if outcome < 0: down += 1 print("The runner was tackled for a loss. Down incremented.") elif yard_line >= 100: score += 6 yard_line = 20 down = 1 print("Touchdown! You scored 6 points.") if down > 4: down = 1 yard_line = 20 print("You didn't get a first down. The ball is turned over.")
The coach swiped Run .
He clicked .