示例#1
0
        public static Turn Create(TurnOrder turnOrder, Phase firstPhase)
        {
            var activePhase = ActivePhase.Create(firstPhase, turnOrder);

            return(new Turn(turnOrder.Id, activePhase.Id)
            {
                TurnOrder = turnOrder,
                CurrentPhase = activePhase
            });
        }
示例#2
0
        public static ActivePhase Create(Phase phase, TurnOrder turnOrder)
        {
            var playerTurns = turnOrder.CreatePlayerTurns(phase.SimultaniousTurns);
            var activePhase = new ActivePhase(phase.Id)
            {
                Phase = phase
            };

            activePhase._playerTurns.AddRange(playerTurns);
            return(activePhase);
        }
示例#3
0
 public void Start(TurnOrder turnOrder, Phase firstPhase)
 {
     Turn = Turn.Create(turnOrder, firstPhase);
 }
示例#4
0
 public ActivePhase Next(TurnOrder turnOrder)
 {
     return(Create(Phase.NextPhase, turnOrder));
 }
示例#5
0
 public Turn Next()
 {
     return(Create(TurnOrder.Shift(), CurrentPhase.Phase.First()));
 }