Exemplo n.º 1
0
        public void CheckIfTheValidateGameInitializationMethodThrowsCorrectlyInvalidOperationExceptionWhenColsOrRowsAreIncorrect()
        {
            var adrian = new KingPlayer("Adrian");
            var martin = new KingPlayer("Martin");

            var board = new Board(10, 10);

            var list = new List<IPlayer>();

            list.Add(adrian);
            list.Add(martin);

            Validator.ValidateGameInitialization(list, board);
        }
        public IList<IPlayer> GetPlayers(int numberOfPlayers)
        {
            var players = new List<IPlayer>();
            //for (int i = 0; i < numberOfPlayers; i++)
            // {
            //Console.Clear();
            //Console.Write(string.Format("Enter player {0} name ", i));
            //string name = Console.ReadLine();

            var kingPlayer = new KingPlayer("King");
            var pawnPlayer = new PawnPlayer("Pawn");
            players.Add(kingPlayer);
            players.Add(pawnPlayer);
            // }
            return players;
        }
Exemplo n.º 3
0
 public void CheckIfTheMoveMethodThrowsCorrectlyIfTheCommandIsThreeSymbolsLongButStillNotCorrect()
 {
     var player = new KingPlayer("Serafim");
     IBoard board = new Board();
     IFigure king = new KingFigureFactory().CreateFigure(FigureSign.K);
     board.AddFigure(king, new Position(Constants.initialKingRow, Constants.initialKingColumn));
     player.Move("aaa", board);
 }