set up logic for the game