code for demo game