Completed game from lecture 3