Code for game