Simple 2D game written with Java (canvas)