public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msgList) { var nextAction = SelectHighPriorityMessage(msgList); return context.OnDahai(nextAction.actor, nextAction.pai, nextAction.tsumogiri); }
public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msgList) { var nextAction = SelectHighPriorityMessage(msgList); if (nextAction.IsREACH()) { return context.OnReach(nextAction.actor); } else if (nextAction.IsANKAN()) { return context.OnAnkan(nextAction.actor, nextAction.consumed); } else if (nextAction.IsKAKAN()) { return context.OnKakan(nextAction.actor, nextAction.pai, nextAction.consumed); } else if (nextAction.IsHORA()) { return context.OnHora(nextAction.actor, nextAction.target, nextAction.pai); } else if (nextAction.IsDAHAI()) { return context.OnDahai(nextAction.actor, nextAction.pai, nextAction.tsumogiri); } else { // it is error if this line executed; Debug.Assert(false); return false; } }