programming code for game