LLD - Design — Chess Game
Given this simplified code snippet for castling validation, what will be the output if the king has moved before?
def can_castle(king_moved, rook_moved, path_clear):
if king_moved or rook_moved:
return False
if not path_clear:
return False
return True
print(can_castle(True, False, True))