Added main codes for the game.