Пример #1
0
        /// <summary>
        /// Adds a player to the controller.
        /// </summary>
        /// <param name="player"> The player to add to the list. </param>
        public void AddPlayer(Player player)
        {
            this.players.AddLast(new LinkedListNode<Player>(player));

            if (this.currentPlayer == null)
            {
                this.currentPlayer = this.players.First;
                this.currentPlayer.Value.StartTurn();
            }
        }
Пример #2
0
 /// <summary>
 /// Adds a player to the list of players in the level.
 /// </summary>
 /// <param name="player"> The player. </param>
 public void AddPlayer(Player player)
 {
     this.PlayerController.AddPlayer(player);
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlayerController"/> class.
 /// </summary>
 /// <param name="player"> The player to add to the list. </param>
 public PlayerController(Player player)
 {
     this.players = new LinkedList<Player>();
     this.AddPlayer(player);
 }