jonesguy14 / footballcoach

Android App for playing/simulating/recruiting as a college football coach
Other
34 stars 8 forks source link

College OT Rules w/ Basic runPlay() logic #35

Closed destilla closed 8 years ago

destilla commented 8 years ago

Overtime will be played the way it is in college football:

Overtime is played in top and bottom frames. Assumes away team lost coin toss, home team elects to play defense first.

Away team begins TOP OT1 with 1st and 10 from the 75 yard line. After a score or a turnover, Home team takes over 1st and 10 from the 75 yard line.

If the teams are tied, Home team begins TOP OT2 with the ball. Repeat until a winner is decided.

Starting in OT3 teams have to go for 2 after a TD.

Going for it in BOT OT when down by a TD is addressed by the runPlay() logic that has a team go for it on 4th down with less than 5 minutes to play if they are down by more than a TD. Overtime will always be negative time (otherwise it's not overtime) as time is set to -1 on each OT start/restart, and goes further into negatives with each play.

Other small changes:

Changed onside kick time decrements to be more in line with their real life counterparts (Onside kicks ) -- I'll revert those if you don't like them.

Changed touchback starting point to match NCAA rule vs NFL rule (25 instead of 20)

Missed FG Attempts inside the 20 move back to the 20 yardline for the new offensive possession per NCCA rules.

On first and goal, GameYardsNeed is set to the distance between GameYardLine and a touchdown. If this isn't done, you can end up with a scenario like "1st and Goal from the Defense's 5 yard line" but GameYardsNeed will equal 10. This matters because logic within runPlay changes depending on what GameYardsNeed is. In the above scenario you would kick a FG on 4th down from the 1 rather than go for it, because GameYardsNeed still equals 6.


I started this before and finished this after you uploaded the changes for 1.21 so I had to do a little manual changing of my file to add in your changes. That's why you see random white spaces appearing as changes in the change log.

jonesguy14 commented 8 years ago

Looks great, you've got a good eye for seeing things that I don't, I didn't even consider the suboptimal play calling that would result from 1st and Goal not being set correctly.

Really great job again, we'll push it out with the next update! I know a lot of people on the subreddit are looking forward to college OT so this will be nice.