示例#1
0
        private void SetupCircularTurns()
        {
            firstTurn = new Turn(players[0]);
            Turn previousTurn = firstTurn;
            Turn currentTurn  = null;

            for (int i = 1; i < players.Length; i++)
            {
                currentTurn           = new Turn(players[i]);
                previousTurn.NextTurn = currentTurn;
                previousTurn          = currentTurn;
            }

            // Setup single player game
            if (currentTurn == null)
            {
                return;
            }

            currentTurn.NextTurn = firstTurn;
            CurrentTurn          = firstTurn;
            CurrentPlayer        = CurrentTurn.Player;
        }
示例#2
0
 public void UpdateTurn()
 {
     CurrentTurn = CurrentTurn.NextTurn;
     ShowPlayerTurn();
 }