latorc / MahjongCopilot

雀魂游戏实时 AI 指导 / In-game step-by-step AI Assistant for Maj-soul
https://mjcopilot.com
GNU General Public License v3.0
402 stars 48 forks source link

Remove unnecessary mjai messages for bots #8

Closed d4kpps8v closed 7 months ago

d4kpps8v commented 7 months ago

According to the source code of libriichi, the messages of types start_game, end_kyoku, and end_game are never used. Initial state info for each kyoku is included in the start_kyoku event.

libriichi does nothing when receiving the end_kyoku or end_game message, without any clean up of states. It also does not use anything from the start_game event. (start_game's id field is not included in the internal structure of this event, so the seat id must be specified in the bot initialization.)

latorc commented 7 months ago

Thanks for the reminder. I manually modified code according to your comments.