Esempio n. 1
0
        internal override string Execute(string[] args)
        {
            var stringLevel = args.FirstOrDefault();

            if (Enum.TryParse(stringLevel ?? ESudokuLevel.Medium.ToString(), out ESudokuLevel level))
            {
                var result = _sudoku.Generate(level);
                _gameContext.CurrentGame = result.Data;
                return(PrintHelper.PrintResult(result));
            }
            return(Resources.GenerateCommand_Execute_IncorectLevelNumber);
        }