def testSumFourPieces(self):
     board = ChessBoard()
     board.addPieceToBoard("Pawn", 5, 2, "White")
     board.addPieceToBoard("Pawn", 4, 2, "White")
     board.addPieceToBoard("Pawn", 6, 2, "White")
     board.addPieceToBoard("King", 5, 1, "White")
     self.assertEqual(board.calculateAllMoves(0), 8)
 def testOppositeNothing(self):
     board = ChessBoard()
     board.addPieceToBoard("Pawn", 5, 2, "Black")
     board.addPieceToBoard("Pawn", 4, 2, "Black")
     board.addPieceToBoard("Pawn", 6, 2, "Black")
     board.addPieceToBoard("King", 5, 1, "Black")
     board.blackCanCastle()
     self.assertEqual(board.calculateAllMoves(0), 0)
 def testSumFourPiecesBlackCanCastle(self):
     board = ChessBoard()
     board.addPieceToBoard("Pawn", 5, 2, "Black")
     board.addPieceToBoard("Pawn", 4, 2, "Black")
     board.addPieceToBoard("Pawn", 6, 2, "Black")
     board.addPieceToBoard("King", 4, 1, "Black")
     board.blackCanCastle()
     self.assertEqual(board.calculateAllMoves(1), 6)
 def testSumTwoPieces(self):
     board = ChessBoard()
     board.addPieceToBoard("Pawn", 1, 2, "White")
     board.addPieceToBoard("Pawn", 2, 2, "White")
     self.assertEqual(board.calculateAllMoves(0), 4)