Code to play and simulate a game of 2048