A programmable gameplay in java