コード例 #1
0
ファイル: GameState.cs プロジェクト: rick0000/MjModel
 public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msg)
 {
     return context.OnTsumo();
 }
コード例 #2
0
ファイル: GameState.cs プロジェクト: rick0000/MjModel
        public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msgList)
        {
            var nextAction = SelectHighPriorityMessage(msgList);

            if (nextAction.IsNONE())
            {
                return context.OnTsumo();
            }
            else if (nextAction.IsPON())
            {
                return context.OnPon(nextAction.actor, nextAction.target, nextAction.pai, nextAction.consumed);
            }
            else if (nextAction.IsCHI())
            {
                return context.OnChi(nextAction.actor, nextAction.target, nextAction.pai, nextAction.consumed);
            }
            else if (nextAction.IsDAIMINKAN())
            {
                return context.OnDaiminkan(nextAction.actor, nextAction.target, nextAction.pai, nextAction.consumed);
            }
            else
            {
                Debug.Assert(false);
                return false;  // If this line executed, It is Error ;
            }
        }