Esempio n. 1
0
 public virtual GameTurn FinishGameTurn(GameTurn lastTurn)
 {
     if (IsRoundComplete)
     {
         return(null);
     }
     GameMessages.Emit(GameMessages.Kind.TurnEnd, lastTurn);
     return(BeginGameTurn(NextPlayer(lastTurn.ActivePlayer)));
 }
Esempio n. 2
0
        protected GameTurn MakeTurn(Player player, GameTurn lastTurn)
        {
            var p    = (player != null) ? player: FirstPlayer.Invoke();
            var turn = m_gameTurnFactory.Invoke(p, this, lastTurn);

            if (turn != null)
            {
                GameMessages.Emit(GameMessages.Kind.TurnBegin, turn);
                turn.DoTurnBegin();
                m_turns.Add(turn);
            }
            return(turn);
        }