jleonard2099 / LHG_Football

Lance Haffner 3-in-1 Football
GNU Affero General Public License v3.0
3 stars 0 forks source link

Computer auto-declines all penalties #14

Closed jleonard2099 closed 11 months ago

jleonard2099 commented 1 year ago

Issue affects, but not necessarily limited to, offensive holding penalties. Reported by multiple users. It is not known if issue exists in the original but there were several bugs encounted getting Football to work in areas like this.

mstockmyer commented 1 year ago

In FOOTBALL.BAS, it looks like the CPU defaults to 'decline' ==>

U$ = U$ + " 1-ACCEPT 2-DECLINE ": Call PBP
If J6(0) <> 0 Then
    I$ = "2"

and then there's only one line later that makes the CPU accept ==>

If P > 0 And J6(0) = 1 And D <> CT And IH = 1 And Y1 - G > 0 Then 8924

. . not a fix, just figuring out where the problem originates

jleonard2099 commented 1 year ago

Great find. Does this mean you think it's a "legacy bugs"? Original src is in zip file in /src. If ita legacy id like to move it to my longer term project.

On Wed, Jan 4, 2023, 10:09 AM mstockmyer @.***> wrote:

In FOOTBALL.BAS, it looks like the CPU defaults to 'decline' ==>

U$ = U$ + " 1-ACCEPT 2-DECLINE ": Call PBP If J6(0) <> 0 Then I$ = "2"

and then there's only one line later that makes the CPU accept ==>

If P > 0 And J6(0) = 1 And D <> CT And IH = 1 And Y1 - G > 0 Then 8924

. . not a fix, just figuring out where the problem originates

— Reply to this email directly, view it on GitHub https://github.com/jleonard2099/LHG_Football/issues/14#issuecomment-1371049674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX64OGUGJNJMC5OQTC4STDDWQWHDZANCNFSM6AAAAAATP7D4VE . You are receiving this because you were assigned.Message ID: @.***>

mstockmyer commented 1 year ago

Jason,

This was a five minute quick look, no idea if it's legacy or new. I think I'm looking at the original src? It could be any of the upstream variables that drive the decision.

I'll have to pull down the latest bundle and work off that.

On Wed, Jan 4, 2023 at 5:43 PM Jason Leonard @.***> wrote:

Great find. Does this mean you think it's a "legacy bugs"? Original src is in zip file in /src. If ita legacy id like to move it to my longer term project.

On Wed, Jan 4, 2023, 10:09 AM mstockmyer @.***> wrote:

In FOOTBALL.BAS, it looks like the CPU defaults to 'decline' ==>

U$ = U$ + " 1-ACCEPT 2-DECLINE ": Call PBP If J6(0) <> 0 Then I$ = "2"

and then there's only one line later that makes the CPU accept ==>

If P > 0 And J6(0) = 1 And D <> CT And IH = 1 And Y1 - G > 0 Then 8924

. . not a fix, just figuring out where the problem originates

— Reply to this email directly, view it on GitHub < https://github.com/jleonard2099/LHG_Football/issues/14#issuecomment-1371049674 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AX64OGUGJNJMC5OQTC4STDDWQWHDZANCNFSM6AAAAAATP7D4VE

. You are receiving this because you were assigned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/jleonard2099/LHG_Football/issues/14#issuecomment-1371638619, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARVX2QGILMKMAEG2O2Y7IBLWQYRLFANCNFSM6AAAAAATP7D4VE . You are receiving this because you commented.Message ID: @.***>

-- Mark Stockmyer @.*** Lead Developer MarKris Development

jleonard2099 commented 1 year ago

Sounds great, thanks for even looking at it. Just taking a quick peek with what I know about the variables, I think this is a legacy bug.

The only condition in which the PC seems to accept the penalty is if the yardage gained from the play (G) wasn't enough for a first down (Y1 is yards-to-go, so Y1 - G > 0 means my play gained less than Y1 yards).

This means ball position / etc. isn't factored in anyway.

Several of the other conditions are just checking to see if the user should be prompted.

Let me know if you're able to confirm.

[image: logo_in_nav_44x36.png] https://www.linkedin.com/pub/jason-leonard/9a/43/735

Galatians 6:9

Jason Leonard

email: @.***

mobile: 302-559-8645

On Wed, Jan 4, 2023 at 11:00 PM mstockmyer @.***> wrote:

Jason,

This was a five minute quick look, no idea if it's legacy or new. I think I'm looking at the original src? It could be any of the upstream variables that drive the decision.

I'll have to pull down the latest bundle and work off that.

On Wed, Jan 4, 2023 at 5:43 PM Jason Leonard @.***> wrote:

Great find. Does this mean you think it's a "legacy bugs"? Original src is in zip file in /src. If ita legacy id like to move it to my longer term project.

On Wed, Jan 4, 2023, 10:09 AM mstockmyer @.***> wrote:

In FOOTBALL.BAS, it looks like the CPU defaults to 'decline' ==>

U$ = U$ + " 1-ACCEPT 2-DECLINE ": Call PBP If J6(0) <> 0 Then I$ = "2"

and then there's only one line later that makes the CPU accept ==>

If P > 0 And J6(0) = 1 And D <> CT And IH = 1 And Y1 - G > 0 Then 8924

. . not a fix, just figuring out where the problem originates

— Reply to this email directly, view it on GitHub <

https://github.com/jleonard2099/LHG_Football/issues/14#issuecomment-1371049674

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AX64OGUGJNJMC5OQTC4STDDWQWHDZANCNFSM6AAAAAATP7D4VE

. You are receiving this because you were assigned.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/jleonard2099/LHG_Football/issues/14#issuecomment-1371638619 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ARVX2QGILMKMAEG2O2Y7IBLWQYRLFANCNFSM6AAAAAATP7D4VE

. You are receiving this because you commented.Message ID: @.***>

-- Mark Stockmyer @.*** Lead Developer MarKris Development

— Reply to this email directly, view it on GitHub https://github.com/jleonard2099/LHG_Football/issues/14#issuecomment-1371756005, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX64OGSGR64IXTHXP5YF23DWQZBPVANCNFSM6AAAAAATP7D4VE . You are receiving this because you were assigned.Message ID: @.***>

jleonard2099 commented 11 months ago

After re-writing thet penalty handling logic some / re-evaluating the original, this was still confirmed to be the original behavior. Added an "Else" clause to decision making for PC vs PC so that it would use the same logic for accepting a penalty.

In general, the logic already built in for the PC to determine when to accept, was pretty solid. No further changes will be made at this time as a large # of updates need made for penalties to be more accurate overall.