ichabod801 / t_games

A collection of command-line interface games written in Python.
GNU General Public License v3.0
21 stars 4 forks source link

TenThousand carry-on option drops requirement to match combos. #493

Closed ichabod801 closed 4 years ago

ichabod801 commented 4 years ago

That should be carried on as well.

ichabod801 commented 4 years ago

The issue is that last_combo is cleared on line 980 when they fail to score anything, before the next player has a chance to carry on in no_score (starting at line 1150). But how do you hang on to that correctly? And should it apply to second chance, which also happens in no_score (line 1111). But you don't want to hang on to it if they did score.

ichabod801 commented 4 years ago

I think the thing to do is create a local variable combo_hold to store last_combo. Then send that as a parameter to no_score, which can send it as a parameter to retry.

ichabod801 commented 4 years ago

It's working for carry-on with the current change (not yet pushed).

ichabod801 commented 4 years ago

Confirmed that the fix works with second-chance as well.