public static void BuildUI() { const int RIGHT_COUNT_ARGS = 3; string[] args = Environment.GetCommandLineArgs(); switch (args.Length) { case RIGHT_COUNT_ARGS: { try { Board board = Board.Initialize(int.Parse(args[1]), int.Parse(args[2])); UI_Console.DrawBoard(board); } catch (ArgumentException) { Console.WriteLine("Incorect enter of args"); Console.ReadKey(); } break; } default: { Instruction(); break; } } }
/// <summary> /// Main method /// </summary> /// <param name="args">Args command line</param> public static void Main(string[] args) { UI_Console.BuildUI(); }