public void Test_RemoveFigureWhitNotExistFigure() { Player tested = new Player("Test", ChessColor.White); Pawn testPawn = new Pawn(ChessColor.White); tested.RemoveFigure(testPawn); }
public void Test_RemoveFigureWhitInvalidColor() { Player tested = new Player("Test", ChessColor.White); Pawn testPawn = new Pawn(ChessColor.Black); tested.RemoveFigure(testPawn); }
public void Test_AddFigureWhitValidData() { Player tested = new Player("Test", ChessColor.White); Pawn testPawn = new Pawn(ChessColor.White); tested.AddFigure(testPawn); }
public void Test_CreatePlayer() { string name = "Test"; ChessColor color = ChessColor.White; Player tested = new Player(name, color); Assert.AreEqual(name, tested.Name); Assert.AreEqual(color, tested.Color); }
public IList<IPlayer> GetPlayers(int numberOfPlayers) { var players = new List<IPlayer>(); for (int i = 1; i <= numberOfPlayers; i++) { Console.Clear(); int centerRow = Console.WindowHeight / 2; int centerCol = Console.WindowWidth / 2 - PlayerNameMasage.Length / 2; Console.SetCursorPosition(centerCol, centerRow); Console.Write(string.Format(PlayerNameMasage, i)); string name = Console.ReadLine(); var player = new Player(name, (ChessColor)(i - 1)); players.Add(player); } return players; }
public void Test_RemoveFigureNull() { Player tested = new Player("Test", ChessColor.White); tested.RemoveFigure(null); }