Esempio n. 1
0
        static void Main(string[] args)
        {
            Player player    = new Player();
            Item   selection = new Item(player);
            Game   game      = new Game(player, selection);

            player.getName();
            game.greetMsg1();
        }
 public void gamePromt()
 {
     Console.WriteLine("(1)Play Again \r\n" + "(2)Exit");
     if (!int.TryParse(Console.ReadLine(), out userChoice) || userChoice > 2)
     {
         selection.errorMsg();
         gamePromt();
     }
     else if (userChoice == 1)
     {
         Player player    = new Player();
         Item   selection = new Item(player);
         Game   game      = new Game(player, selection);
         player.getName();
         game.greetMsg1();
     }
     else if (userChoice == 2)
     {
         System.Environment.Exit(0);
     }
 }