moxcomic / archer

Archer is a top-tier Mahjong AI development framework, currently reaching as high as Tenhou 9.7 dan.
41 stars 1 forks source link

how to know ron or tsumo from AIResult? #13

Closed paramcpp closed 9 months ago

paramcpp commented 9 months ago

https://github.com/moxcomic/archer/wiki/lq#type

both ron and tsumo are type 9. how do i know ron or tsumo from AIResult?

switch result.Result[0].Type {
case 9: // Ron & Tsumo
if ron {
  actions.NewMajsoulActions().Ron()
} else {
  actions.NewMajsoulActions().Tsumo()
}
}
moxcomic commented 9 months ago
const (
  E_PlayOperation_None           = iota
  E_PlayOperation_Discard        // discard
  E_PlayOperation_Chi            // chii
  E_PlayOperation_Pon            // pon
  E_PlayOperation_Ankan          // ankan
  E_PlayOperation_Minkan         // daimingkan
  E_PlayOperation_Kakan          // kakan
  E_PlayOperation_RiiChi         // riichi
  E_PlayOperation_Tsumo          // tsumo
  E_PlayOperation_Ron            // ron
  E_PlayOperation_JiuZhongJiuPai // 99
  E_PlayOperation_Babei
  E_PlayOperation_HuanSanZhang
  E_PlayOperation_DingQue
  E_PlayOperation_Reveal
  E_PlayOperation_Unveil
  E_PlayOperation_LockTile
  E_PlayOperation_Revealliqi
)
paramcpp commented 9 months ago

thanks!