Exemplo n.º 1
0
        public static Missile CreateMissile(LauncherController LaunHandler)
        {
            string type = UserInputValidator.ReadMissileTypeName("Which Type of missile would you like to create?");

            LauncherMenuRunner.ShowTechniquesMenu(LaunHandler.Launcher);
            ITechnique tech = UserInputValidator.GetChoiceOfDictionary <int, ITechnique>(LaunHandler.Launcher.LaunchTechniques);

            while (tech.TargetMissile != type)
            {
                Console.WriteLine($"The technique does not fit to {type} missile, please choose the currect on:");
                tech = UserInputValidator.GetChoiceOfDictionary <int, ITechnique>(LaunHandler.Launcher.LaunchTechniques);
            }
            return(CreateMissile(type, tech));
        }
Exemplo n.º 2
0
        public static string ReadMissileTypeName(string output)
        {
            //Console.WriteLine(output);
            //Console.WriteLine("[" + String.Join(" / " , Enum.GetNames(typeof(MissileTypes))) + "]");
            int count = 1;
            Dictionary <int, string> missileTypes = new Dictionary <int, string>();

            foreach (string mtype in Enum.GetNames(typeof(MissileTypes)))
            {
                missileTypes.Add(count, mtype);
                count++;
            }
            LauncherMenuRunner.PrintMenuFromDict <int, string>(missileTypes, output);
            return(UserInputValidator.GetChoiceOfDictionary <int, string>(missileTypes));
        }
Exemplo n.º 3
0
 public void ShowLaunchMenu()
 {
     LauncherMenuRunner.LaunchMissilesMenu(this);
 }
 public void Run()
 {
     LauncherMenuRunner.RunLauncherMainMenu(LauncherOptions);
 }