Esempio n. 1
0
 public static void ComputerChoice(int MonId)
 {
     if (MonId == 1)
     {
         Mon    mon2     = Mon.Find(2);
         Battle computer = mon2.GetAllTrueStats();
         computer.Save();
         computer.SetComputerMon();
         computer.SetActiveMon();
     }
     else if (MonId == 2)
     {
         Mon    mon3     = Mon.Find(3);
         Battle computer = mon3.GetAllTrueStats();
         computer.Save();
         computer.SetComputerMon();
         computer.SetActiveMon();
     }
     else if (MonId == 3)
     {
         Mon    mon1     = Mon.Find(1);
         Battle computer = mon1.GetAllTrueStats();
         computer.Save();
         computer.SetComputerMon();
         computer.SetActiveMon();
     }
     else if (MonId > 3)
     {
         List <Mon> allMons   = Mon.GetAllMons();
         Random     rand      = new Random();
         Mon        chosenMon = Mon.Find(rand.Next(allMons.Count));
         Console.WriteLine(chosenMon.GetMonName());
         Battle computer = chosenMon.GetAllTrueStats();
         computer.Save();
         computer.SetComputerMon();
         computer.SetActiveMon();
     }
 }