コード例 #1
0
        private void SelectGameOption()
        {
            string[] descriptionLines = { "Hello " + coach.name, "Select your game option:" };
            string[] options          = { "[1] World Cup" };

            int selectedOption = ConsoleHandler.OptionChoice(false, descriptionLines, options);

            switch (selectedOption)
            {
            case 0:
                StartNewWorldCup();
                break;
            }
            ;
        }
コード例 #2
0
        public void StartGame()
        {
            StartNewWorldCup();

            string option = ConsoleHandler.Welcome();

            switch (option)
            {
            case "[1] New Game":
                CreateNewCoach();
                break;

            case "[2] About":
                break;
            }
        }
コード例 #3
0
        public void StartNewWorldCup(CoachModel coach)
        {
            string[]      description         = { "Welcome to World Cup " + "[COACH NAME]", "Please select your team:" };
            List <string> teamListToSelection = new List <string> {
            };

            foreach (TeamModel team in teams)
            {
                teamListToSelection.Add(team.name);
            }

            var optionSelected = ConsoleHandler.SelectWorldCupTeam(description, teamListToSelection.ToArray());

            Console.Clear();
            Console.Write("Selected Team2: " + teamListToSelection[optionSelected]);
            Console.ReadKey();
        }
コード例 #4
0
 // private methods
 private static void DefaultTitile() => ConsoleHandler.TextArt(defaultTitle);
コード例 #5
0
 // public methods
 public void CreateNewCoach()
 {
     coach = ConsoleHandler.CreateCoach();
     SelectGameOption();
 }