Closed akeaswaran closed 8 years ago
You are totally correct, this is not on the iOS only. I thought about this while doing the OT setup and just wanted to get it in place, so I didn't do anything about not kicking the XP in the bottom frame.
Ideally, I wanted to do this for OT and add something to make it so that if you score a walk off TD, you only kick the XP or go for two if the 6 points makes your lead 2pts or less, just like NCCA rules. My thinking was that if the chance for a PAT returned for 2pts by the defense is ever implemented, the logic is already in line with NCAA rules and the chance to return a blocked/turned over PAT in a last ditch scenario.
In retrospect, it's probably just a few lines of code to check for !bottomOT or not and then not kick the XP and I was just lazy. Sorry for not addressing this in the first place and making you go through the hassle of converting back into java. I'll take a look at it when I wake up and make a fix.
Edit: Also it's 2 AM and I'm totally out of it, I hope that explanation made sense.
Boom.
Took the time to do this right way; this should be resolved in #38 .
No XP/2pt try if a go ahead TD happens in the bottom frame of OT, or as time expires and the score difference is greater than 2. I'm trying to step through the logic in my brain, but I think this also covers not attempting the PAT if you're down by more than 2 after scoring a TD as time expires.
I really hope I didn't make you spend a lot of time doing the conversion to Object-C and if I did, I am really sorry.
Resolved with b90b901bdbf586cbc1ff35e1202d73f84ec05b56
Thanks to both of you!
@destilla You're fine! It wasn't that much work to convert the Java code. However, I am still experiencing this issue. I'll close it here since it looks like it's been fixed on Android and I'll continue to look into it on iOS.
Just double checked the android version:
TDs as time expires are behaving appropriately (although they still tried a kickoff, which I resolved with #40)
annnnd
OT is behaving properly, so looks like this is fixed for Android. Good luck with the iOS hunting! (I'd help but I don't know the first thing about apple products)
After integrating some of the most recent commits, the iOS version seems to be working correctly now.
¯(ツ)/¯
Just saw your commits on OT logic and decided to implement them in the iOS version. I translated your Java code as well as I could to Objective-C and everything works well, but there's just one tiny issue that I noticed.
If you look at the final section of the game summary below, you'll see that Alamo State attempts the 2-point conversion after scoring a touchdown to win the game in the bottom frame of the 3rd OT period.
I think the game should just end after that touchdown; there's no sense in going for 2 in that scenario. It's entirely possible that this issue may just exist on iOS and not Android, so, if in fact that's the case, I'll close this, but I just wanted to make you aware of the issue in case you come across it as well. I'll take a closer look at my implementation in the morning, and I'll let you know what I find.