LLD - Design — Chess Game
Identify the bug in this check detection function:
def is_check(board, king_pos):
for pos in board:
if board[pos] == 'queen' and can_attack(pos, king_pos):
return True
return False