Skip to content

fix: menu music restart and flaky RecursiveBacktrackerTest - #14

Merged
Aston13 merged 1 commit into
masterfrom
fix/menu-music-and-flaky-test
Mar 2, 2026
Merged

fix: menu music restart and flaky RecursiveBacktrackerTest#14
Aston13 merged 1 commit into
masterfrom
fix/menu-music-and-flaky-test

Conversation

@Aston13

@Aston13 Aston13 commented Mar 2, 2026

Copy link
Copy Markdown
Owner

Bugs Fixed

Main menu music restarts when returning from sub-menu

\AudioManager.playMusic()\ now tracks the current music resource path. If the same track is already playing, the call is a no-op — navigating Settings -> Esc -> Main Menu no longer restarts the music.

Flaky RecursiveBacktrackerTest (StackOverflowError)

Converted \RecursiveBacktracker.setExitPath()\ from a recursive method to an iterative loop with an explicit stack. This eliminates the \StackOverflowError\ that occurred non-deterministically on large or deeply-branching mazes. Verified stable across 5 consecutive test runs.

Warnings Cleaned Up

  • Removed unused \AssetManager.WALL_COMBINATIONS\ field
  • Removed unused \TouchDpad.BG_PRESSED\ field
  • Replaced deprecated
    ew Locale(String)\ with \Locale.of(String)\ in \Start.java\ and \SettingsPanel.java\

Files Changed

File Change
\AudioManager.java\ Track current music path, skip redundant reload
\RecursiveBacktracker.java\ Iterative \setExitPath()\ replacing recursive version
\AssetManager.java\ Remove unused \WALL_COMBINATIONS\
\TouchDpad.java\ Remove unused \BG_PRESSED\
\Start.java\ \Locale.of()\ instead of deprecated constructor
\SettingsPanel.java\ \Locale.of()\ instead of deprecated constructor

@Aston13 Aston13 self-assigned this Mar 2, 2026
@Aston13
Aston13 force-pushed the fix/menu-music-and-flaky-test branch from 4d6bb47 to 7de2a9a Compare March 2, 2026 08:56
@Aston13
Aston13 enabled auto-merge (squash) March 2, 2026 08:56
- AudioManager.playMusic() skips reload when the same track is already playing
- RecursiveBacktracker.setExitPath() converted from recursive to iterative
- Remove dead fields: MazeGame.ui, MenuManager.ui, Renderer.game,
  MainMenuPanel.audioManager, ResultOverlayPanel.audioManager,
  AssetManager.WALL_COMBINATIONS, TouchDpad.BG_PRESSED
- Remove unused UI parameter from MazeGame and MenuManager constructors
- Remove unread counters in GameLoopTest.StubCallbacks
- Replace deprecated new Locale(String) with Locale.of(String)
- Use FQN org.gradle.api.GradleException in build.gradle
@Aston13
Aston13 force-pushed the fix/menu-music-and-flaky-test branch from 7de2a9a to e7cafa3 Compare March 2, 2026 08:57
@Aston13
Aston13 merged commit 4302c9f into master Mar 2, 2026
1 check passed
@Aston13
Aston13 deleted the fix/menu-music-and-flaky-test branch March 2, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant