public static void BuildUI(string[] args) { const int RIGHT_ARGS = 1; switch (args.Length) { case RIGHT_ARGS: { try { Board board = Board.Create(int.Parse(args[1]), int.Parse(args[2])); UIBoard.DrowBoard(board); } catch (ArgumentException e) { Console.WriteLine(e.Message); } break; } default: { Instruction(); break; } } }
static void Main(string[] args) { UIBoard.BuildUI(args); }