def test_moves_corner(self): knight = Knight(self.white, (0, 0)) moves = list(knight.moves(self.board)) self.assertEquals(len(moves), 2)
def test_moves_blocked_enemy(self): knight = Knight(self.white, (0, 0)) bishop = Bishop(self.black, (1, 2)) self.board.add_piece(bishop) moves = list(knight.moves(self.board)) self.assertEquals(len(moves), 2)
def test_moves_center(self): knight = Knight(self.white, (4, 4)) moves = list(knight.moves(self.board)) self.assertEquals(len(moves), 8)