private Player(ActivePlayer colorJugador, IODevice iODevice)
        {
            if (colorJugador != ActivePlayer.Player && colorJugador != ActivePlayer.User)
            {
                throw new ArgumentOutOfRangeException("playerColor");
            }

            this.playerStatus = colorJugador;
            this.iODevice     = iODevice;
        }
            public ConsoleGame(DifficultyLevel difficultyLevel, ActivePlayer computerColor, bool computerPlaysFirst, IODevice iODevice)
                : base(difficultyLevel, computerColor, computerPlaysFirst, iODevice)
            {
                computerPlayer = Player.CreateComputerPlayer(computerColor, difficultyLevel, iODevice);
                humanPlayer    = Player.CreateHumanPlayer(computerColor == ActivePlayer.Player ? ActivePlayer.User : ActivePlayer.Player, iODevice);

                if (computerPlaysFirst)
                {
                    activePlayer = computerPlayer;
                }
                else
                {
                    activePlayer = humanPlayer;
                }

                this.iODevice = iODevice;
            }
 private Game(DifficultyLevel difficultyLevel, ActivePlayer computerColor, bool computerHasFirstTurn, IODevice iODevice)
 {
     board         = Board.EmptyBoard;
     this.iODevice = iODevice;
 }
 public static Game CreateConsoleGame(DifficultyLevel difficultyLevel, ActivePlayer colorOrdenador, bool computerHasFirstTurn)
 {
     return(new ConsoleGame(difficultyLevel, colorOrdenador, computerHasFirstTurn, IODevice.CreateConsoleDevice()));
 }
 public HumanConsolePlayer(ActivePlayer color, IODevice iOdevice)
     : base(color, iOdevice)
 {
 }
 public ComputerConsolePlayer(ActivePlayer color, DifficultyLevel difficulty, IODevice iODevice)
     : base(color, iODevice)
 {
     engine = new AIEngine(difficulty);
 }
 public static Player CreateComputerPlayer(ActivePlayer color, DifficultyLevel difficultyLevel, IODevice iODevice)
 {
     return(new ComputerConsolePlayer(color, difficultyLevel, iODevice));
 }
 public static Player CreateHumanPlayer(ActivePlayer color, IODevice iODevice)
 {
     return(new HumanConsolePlayer(color, iODevice));
 }