Not yet entirely satisfied with the result as the animation kinda lags when you increase the timer delay in MazeDrawing.java#L68. But anyway the timer and UI are thread-separated, that means that we can still do stuff in the UI while the animation is running.
Note that I changed the variable pathDrawn from boolean to int, because there was three states to represent :
pathDrawn = 0 corresponds to the state where nothing is drawn
pathDrawn = 1 corresponds to the state where we are going to animate the path
pathDrawn = 2 corresponds to the state where we re-draw the path which had been already animated. By that I mean that there's no need to animate the path drawing once more when it has been already drawn.
Also changed the ugly orange ovals to tiny cute circles. ^_^
Not yet entirely satisfied with the result as the animation kinda lags when you increase the timer delay in [MazeDrawing.java#L68](https://git.regar42.fr/antograb/TpMazeJava/commit/9394eb487b7e60c4815d7c614b7969defcf50e75/src/ui/MazeDrawing.java#L68). But anyway the timer and UI are thread-separated, that means that we can still do stuff in the UI while the animation is running.
Note that I changed the variable `pathDrawn` from `boolean` to `int`, because there was three states to represent :
- `pathDrawn = 0` corresponds to the state where nothing is drawn
- `pathDrawn = 1` corresponds to the state where we are going to *animate* the path
- `pathDrawn = 2` corresponds to the state where we *re-draw* the path which had been already animated. By that I mean that there's no need to animate the path drawing once more when it has been already drawn.
Also changed the ugly orange ovals to tiny cute circles. ^_^
regar42
was assigned by antograb2017-12-28 14:11:36 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Not yet entirely satisfied with the result as the animation kinda lags when you increase the timer delay in MazeDrawing.java#L68. But anyway the timer and UI are thread-separated, that means that we can still do stuff in the UI while the animation is running.
Note that I changed the variable
pathDrawnfrombooleantoint, because there was three states to represent :pathDrawn = 0corresponds to the state where nothing is drawnpathDrawn = 1corresponds to the state where we are going to animate the pathpathDrawn = 2corresponds to the state where we re-draw the path which had been already animated. By that I mean that there's no need to animate the path drawing once more when it has been already drawn.Also changed the ugly orange ovals to tiny cute circles. ^_^
If you feel like it, you can label the PR as [WIP] and fix that lag later.
Pull request closed