8d7eac940bec88896ea0ecd977223ebe9ef41938
This solves a race condition, yes using lock/semaphore would do this too, but that is a considerable amount of complexity for what amounts to an extremely simple bit of blocking logic. busy-wait works just as well and is insignificantly more expensive with the use of thread.sleep.
Shattered Pixel Dungeon
Fork of Pixel Dungeon, a traditional roguelike game with pixel-art graphics and simple interface.
Shattered Pixel Dungeon on Google Play: https://play.google.com/store/apps/details?id=com.shatteredpixel.shatteredpixeldungeon
Official web-site: http://www.shatteredpixel.com
Developer's blog: http://shatteredpixel.tumblr.com/
To build the game you will need my modified PD-classes library: https://github.com/00-Evan/PD-classes
Description
Languages
Java
100%