Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 210: Programming Fundamentals College Football Overtime Simulator Due Wednesday, March 3 at 6:00pm 38 points In this example, you will simulate a single possession

image text in transcribed
CS 210: Programming Fundamentals College Football Overtime Simulator Due Wednesday, March 3 at 6:00pm 38 points In this example, you will simulate a single possession of a college football overtime. In overtime, you take possession of the ball at the 25 yard line, and you try to score. In our simulation, we will assume that your kicker is awful, so you will never try for a field goal. You have to score a touchdown to win. As in real football, you have four downs to go 10 yards. When you do go 10 yards, the downs are reset. If you fail to go 10 yards after four tries, you lose possession and, in our case, you lose the game. In your program, you will draw the football field and the position of the ball in turtle graphics. You will ask the user what play they want to run - either a run or a pass - and they will press p to pass and r to run. If the user chooses to pass the ball, they have a 50% chance of completing the pass. If they complete the pass, it will be for between 3 and 15 yards. If they choose to run, the play will advance the ball up to 8 yards, or it could result in a loss of up to 3 yards. After each play, you must show the current status. If they lost because they were unable to go 10 yards in 4 downs, then you should display the fact that they lost. If they win because they go to the goal line, you should display that they won. Otherwise, you should display their current down and how many yards they have to go The game will display both the football field and text on the input window where the player indicates what they want to do. Here is what the football field should look like: 20 15 10 Down 1. 10 yards To play the game, the player will enter to run and p to pass in the terminal. As they select their plays. the terminal will update to show them their down and how far they have to go on the current down. The CS 210: Programming Fundamentals College Football Overtime Simulator Due Wednesday, March 3 at 6:00pm 38 points In this example, you will simulate a single possession of a college football overtime. In overtime, you take possession of the ball at the 25 yard line, and you try to score. In our simulation, we will assume that your kicker is awful, so you will never try for a field goal. You have to score a touchdown to win. As in real football, you have four downs to go 10 yards. When you do go 10 yards, the downs are reset. If you fail to go 10 yards after four tries, you lose possession and, in our case, you lose the game. In your program, you will draw the football field and the position of the ball in turtle graphics. You will ask the user what play they want to run - either a run or a pass - and they will press p to pass and r to run. If the user chooses to pass the ball, they have a 50% chance of completing the pass. If they complete the pass, it will be for between 3 and 15 yards. If they choose to run, the play will advance the ball up to 8 yards, or it could result in a loss of up to 3 yards. After each play, you must show the current status. If they lost because they were unable to go 10 yards in 4 downs, then you should display the fact that they lost. If they win because they go to the goal line, you should display that they won. Otherwise, you should display their current down and how many yards they have to go The game will display both the football field and text on the input window where the player indicates what they want to do. Here is what the football field should look like: 20 15 10 Down 1. 10 yards To play the game, the player will enter to run and p to pass in the terminal. As they select their plays. the terminal will update to show them their down and how far they have to go on the current down. The

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

=+What is the local economic

Answered: 1 week ago

Question

=+Does this message make effective use of the AIDA model?

Answered: 1 week ago