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; } }
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) { return context.OnEndKyoku(); }
public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msg) { return context.OnTsumo(); }
public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msgList) { if (msgList.Exists(e => e.IsHORA())) { var nextAction = msgList.First(e => e.IsHORA()); return context.OnHora(nextAction.actor, nextAction.target, nextAction.pai); } else { return context.OnReachAccept(); } }
public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msgList) { var nextAction = msgList.First(e => e.IsDAHAI()); return context.OnReachDahai(nextAction.actor, nextAction.pai, nextAction.tsumogiri); }
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 ; } }
public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msgList) { return context.OnOpenDora(); }
public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msgList) { var nextAction = SelectHighPriorityMessage(msgList); if (nextAction.IsNONE()) { return context.OnOpenDora(); } else if (nextAction.IsHORA()) { return context.OnHora(nextAction.actor, nextAction.target, nextAction.pai); } else { Debug.Assert(false); return false; // If this line executed, It is Error ; } }
public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msgList) { if (context.OnCheckIsEndGame()) { return context.OnEndGame(); } else { return context.OnStartKyoku(); } }
public bool ExecuteAction(GameContext context, List<MJsonMessageAll> msgList) { Debug.Assert(false); return false; }