Exemple #1
0
        private Player CreatePlayer(PlayerProperties properties, DiscColor color)
        {
            switch (properties.Type)
            {
            case PlayerType.Human:
                return(new HumanPlayer(this, color, properties.Name));

            case PlayerType.Computer:
                return(new ComputerPlayer(this, color, properties.Name, properties.MaxDepth));
            }

            return(null);
        }
Exemple #2
0
 public Player CreatePlayer2(PlayerProperties properties)
 {
     this.mPlayer2 = this.CreatePlayer(properties, DiscColor.White);
     return(this.mPlayer2);
 }
Exemple #3
0
 public Player CreatePlayer1(PlayerProperties properties)
 {
     this.mPlayer1 = this.CreatePlayer(properties, DiscColor.Black);
     return(this.mPlayer1);
 }