public static string MachineGunPath(StormTrooper dude, string nombre) { MachineGunner Wambo = new MachineGunner("Rockman", aName: "Ronald", 22, "Human", 67); Wambo.Truth(); Console.WriteLine($"\n\tYou'll know that soon {nombre}."); return("The force"); // Not inteneded to dislpay, only needed to pass the object }
public static string UnluckyPath(string nombre) { StormTrooper guy = new StormTrooper("New guy", aName: Console.ReadLine(), 18, "Talz", 70); guy.BadLuck(); Console.WriteLine($"\n\t{nombre} is so unlucky"); return(destiny()); }
public static string PilotPath(StormTrooper dude, string nombre) { Pilot Chuck = new Pilot("Chuck", aName: "Charles", 22, "Wookie", 94); Chuck.Flyer(); Console.WriteLine($"\n\t{nombre} is never flying"); return("The force"); }
public static string EngineerPath(StormTrooper dude, string nombre) { Engineer Bobby = new Engineer("Bobby", aName: "Brandon", 22, "Gand", 66); Bobby.BuildStuff(); Console.WriteLine($"\n\t{nombre} is going to build alot of stuff"); return("The force"); }
public static string SniperPath(StormTrooper dude, string nombre) { Sniper Legend = new Sniper("UnSeen One", aName: "John", 42, "Human", 72); Legend.Sneaky(); Legend.Champ(); Console.WriteLine($"\n\tLets make you a sniper {nombre}."); return("The force"); }
public static string stormTroopPath() { StormTrooper dude = new StormTrooper("New guy", aName: Console.ReadLine(), 18, "Human", 68); StormTrooper bob = new StormTrooper("Liar", aName: "Lyzo", 19, "Human", 68); bob.NameYourself(); string aName = Console.ReadLine().ToLower(); string nombre = aName; // To pass off object name that is a readline if ((aName == " ") || (aName == "")) { return(stormTroopPath()); } Console.WriteLine($"\n\tWelcome to the empire {aName}!"); bob.Train(); bob.Job(); string choice = Console.ReadLine().ToLower(); Random r = new Random(); //random variable var list = new List <string> { "machinegunner", "sniper", "pilot", "engineer" }; int career = r.Next(list.Count); // Random index string lucky = (list[career]); // String of random index Console.WriteLine($"\n\tlooks like you got {lucky}"); // Maybe you got lucky?? if (choice == lucky) { if (choice == "machinegunner") { return(MachineGunPath(dude, nombre)); } if (choice == "sniper") { return(SniperPath(dude, nombre)); } if (choice == "pilot") { return(PilotPath(dude, nombre)); } if (choice == "engineer") { return(EngineerPath(dude, nombre)); } } else if (choice != lucky) { return(UnluckyPath(nombre)); //Looks like you didn't } return("The End"); }