Esempio n. 1
0
        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;
            }
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Main method
 /// </summary>
 /// <param name="args">Args command line</param>
 public static void Main(string[] args)
 {
     UI_Console.BuildUI();
 }