critter-mj / akochan

Artificial Intelligence for Japanese mahjong
Other
244 stars 38 forks source link

legal chi and dahai judge, may be bug #24

Open heartup opened 2 years ago

heartup commented 2 years ago

https://github.com/critter-mj/akochan/blob/ab83c9369810fa9b5e58502ca097403bb860011a/share/make_move.cpp#L416

I think it should be the following: if (haikind(hai) < haikind(consumed0) && haikind(hai) < haikind(consumed1) && haikind(dahai) == haikind(hai) + 3) { return false; } if (haikind(hai) > haikind(consumed0) && haikind(hai) > haikind(consumed1) && haikind(dahai) == haikind(hai) - 3) { return false; }

critter-mj commented 2 years ago

Thank you for reporting! I'm glad to know that the code is checked by other developers. Now I have fixed this bug.