Java game design