diff --git a/scenes/game/gameplays/match3_gameplay.gd b/scenes/game/gameplays/match3_gameplay.gd index ef11a2c..46fa341 100644 --- a/scenes/game/gameplays/match3_gameplay.gd +++ b/scenes/game/gameplays/match3_gameplay.gd @@ -623,6 +623,12 @@ func _input(event: InputEvent) -> void: if current_state == GameState.SWAPPING or current_state == GameState.PROCESSING: return + # Handle action_east (B button/ESC) to deselect selected tile + if event.is_action_pressed("action_east") and current_state == GameState.SELECTING: + DebugManager.log_debug("action_east pressed - deselecting current tile", "Match3") + _deselect_tile() + return + # Handle keyboard/gamepad navigation if event.is_action_pressed("move_up"): _move_cursor(Vector2i.UP) @@ -825,7 +831,9 @@ func _are_adjacent(tile1: Node2D, tile2: Node2D) -> bool: func _attempt_swap(tile1: Node2D, tile2: Node2D) -> void: if not _are_adjacent(tile1, tile2): - DebugManager.log_debug("Tiles are not adjacent, cannot swap", "Match3") + DebugManager.log_debug("Tiles are not adjacent, selecting new tile instead", "Match3") + _deselect_tile() + _select_tile(tile2) return DebugManager.log_debug(