コード例 #1
0
ファイル: Game.cs プロジェクト: thuctapnhom111111/gamego
        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);
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: thuctapnhom111111/gamego
 public Player CreatePlayer2(PlayerProperties properties)
 {
     this.mPlayer2 = this.CreatePlayer(properties, DiscColor.White);
     return(this.mPlayer2);
 }
コード例 #3
0
ファイル: Game.cs プロジェクト: thuctapnhom111111/gamego
 public Player CreatePlayer1(PlayerProperties properties)
 {
     this.mPlayer1 = this.CreatePlayer(properties, DiscColor.Black);
     return(this.mPlayer1);
 }