a simple game and engine in java/swing