The Unexpected behaviour mentioned in issue #1536 occurs randomly it's not related to restarting the activity or anything.
The behaviour is due to calling runLevel function several times without clearing the dirtyCells array/state.
if we call runLevel again and dirtyCells still have some cells left to draw from previous level, it'll try to draw it in another level.
I also reproduced the unexpected behaviour by setting maze.goalPoint to same as maze.startPoint (which was in actual code happening randomly) and then with setTimeout changing the goalPoint again.
The Unexpected behaviour mentioned in issue #1536 occurs randomly it's not related to restarting the activity or anything.
The behaviour is due to calling
runLevel
function several times without clearing thedirtyCells
array/state.if we call
runLevel
again anddirtyCells
still have some cells left to draw from previous level, it'll try to draw it in another level.I also reproduced the unexpected behaviour by setting
maze.goalPoint
to same asmaze.startPoint
(which was in actual code happening randomly) and then withsetTimeout
changing thegoalPoint
again.https://github.com/llaske/sugarizer/assets/90092555/5efe0905-6a90-4b62-9f4c-c1737e7852c8