Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something is wrong when bot can choose between pon and kan #22

Closed
daycheat opened this issue Mar 11, 2022 · 1 comment
Closed

Something is wrong when bot can choose between pon and kan #22

daycheat opened this issue Mar 11, 2022 · 1 comment

Comments

@daycheat
Copy link
Contributor

bot is west player

  1. 4m|0m444556p|111z678s|||222m666p|256z9s1p7z1m8p|9m326z87p9m|4z92p9m7p6z2p|19s74m1p6s7p|0,0,0,0|3|1|40 (east player's turn)
  2. 4m|0m444556p|111z678s|||222m666p|256z9s1p7z1m8p|9m326z87p9m|4z92p9m7p6z24p|19s74m1p6s7p|0,0,0,0|3|1|40 (east player discarded 4p)
  3. 4m|0m4556p|111z678s444p|||222m666p|256z9s1p7z1m8p|9m326z87p9m|4z92p9m7p6z2p|19s74m1p6s7p|0,0,0,0|3|1|40 (bot called pon for 4p, even though bot could choose kan)

bot stopped working after called pon for 4p (probably bot couldn't discard a 4p left because of the rule)

@Jimboom7
Copy link
Owner

Thank you for the detailed debug log, it helped a lot in recreating the situation.
The problem was not being unable to discard the 4p (the bot already makes sure not to do that). But a while ago I changed the way the operations (pon, kan, etc.) are handled: The UI and timer now get closed after accepting the first operation, but unfortunately that also clears the variable that stores the possible operations and causes a nullpointer if there are multiple. I'll push a fix now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants