When castling, the Location of the King somehow ends up as empty when testing checks in King.
test = copy.deepcopy(position)
# Somehow the Location of the King is empty
test_move = Move(end_loc=move.end_loc,
piece=test.piece_at_square(self.location), # Problem right here
status=move.status,
start_rank=self.location.rank,
start_file=self.location.file)
test.update(test_move)
test_king = test.piece_at_square(test_move.end_loc)
When castling, the Location of the King somehow ends up as empty when testing checks in King.