Exemple #1
0
 public void TestKnightWithTakeablePiece()
 {
     var target = new Knight(true, "Aa1");
     var target2 = new Pawn(false, "Bc1");
     var movesList = new List<String> { "Ab3", "Ba3", "Ac2", "Bc1", "Ca2", "Cb1" };
     _board.GetCell(target2.CurrentPos).AddPiece(target2);
     Assert.AreEqual(movesList, target.GetMoves(_board));
 }
Exemple #2
0
 public void TestNewKnight()
 {
     var target = new Knight(true, "test");
     Assert.IsNotNull(target);
     Assert.IsTrue(target.White);
 }
Exemple #3
0
 public void TestKnightInCorner()
 {
     var target = new Knight(true, "Aa1");
     var movesList = new List<String> { "Ab3", "Ba3", "Ac2", "Bc1", "Ca2", "Cb1"};
     Assert.AreEqual(movesList, target.GetMoves(_board));
 }
Exemple #4
0
 public void TestKnightWithSomeMoves()
 {
     var target = new Knight(true, "Ab1");
     var movesList = new List<String> { "Aa3", "Ac3", "Bb3", "Ad2", "Bd1","Cb2", "Ca1","Cc1" };
     Assert.AreEqual(movesList, target.GetMoves(_board));
 }
Exemple #5
0
 public void TestKnightGetMoves()
 {
     var target = new Knight(true, "Cc3");
     var movesList = new List<String> { "Cb5", "Cd5", "Bc5", "Dc5", "Cb1", "Cd1", "Bc1", "Dc1", "Ca4", "Ca2", "Ba3", "Da3", "Ce4", "Ce2", "Be3", "De3", "Ac4", "Ac2", "Ab3", "Ad3", "Ec4", "Ec2", "Eb3", "Ed3"};
     Assert.AreEqual(movesList, target.GetMoves(_board));
 }