Beispiel #1
0
        public async Task StartAsync()
        {
            _logger.LogInformation("class MainMenu. StartAsync()");

            while (true)
            {
                MenuLibrary.Clear();

                _logger.LogInformation("Choosing the command");

                var options = new string[] { "Authorization", "Leaderboard", "Exit" };
                var command = MenuLibrary.InputMenuItemNumber("Main Menu", options);

                _logger.LogInformation("Chose the command");

                switch (command)
                {
                case 1:
                    await _authMenu.StartAsync();

                    break;

                case 2:
                    await _leaderMenu.StartAsync();

                    break;

                case 3:
                    return;
                }
            }
        }
        public async Task StartAsync()
        {
            _logger.LogInformation("class StatisticsMenu. StartAsync()");

            while (true)
            {
                _logger.LogInformation("Choosing the Statistics");

                MenuLibrary.Clear();

                var options = new string[] { "Leaderboard", "Player statistics", "Back" };
                var command = MenuLibrary.InputMenuItemNumber("Statistics Menu", options);

                _logger.LogInformation("Chose the command");

                switch (command)
                {
                case 1:
                    await _leaderboardMenu.StartAsync();

                    break;

                case 2:
                    await _playerStatisticsMenu.StartAsync();

                    break;

                case 3:
                    return;
                }
            }
        }