Simple game engine in Java