diff --git a/examples/the-dungeon-puzzlers-lament/src/game/game_state.rs b/examples/the-dungeon-puzzlers-lament/src/game/game_state.rs index cf5f44e6..75774fca 100644 --- a/examples/the-dungeon-puzzlers-lament/src/game/game_state.rs +++ b/examples/the-dungeon-puzzlers-lament/src/game/game_state.rs @@ -390,8 +390,7 @@ impl CursorState { let mut new_x = current_x.saturating_add_signed(lr as isize).max(1); let new_y = current_y .saturating_add_signed(ud as isize) - .max(1) - .min(PLAY_AREA_HEIGHT - 2); + .clamp(1, PLAY_AREA_HEIGHT - 2); if new_x == PLAY_AREA_WIDTH - 1 { new_x = new_x.min(PLAY_AREA_WIDTH - 2);