예제 #1
0
파일: UI.cs 프로젝트: Ilhamich/EcoModel
        public static void PrintField(FieldBorders field)
        {
            Console.ForegroundColor = ConsoleColor.DarkBlue;

            for (int i = 0; i < field.FieldLenght; i++)
            {
                Console.SetCursorPosition(field[i].X, field[i].Y);
                Console.Write(field[i].Symbol);
            }

            Console.ResetColor();
        }
예제 #2
0
        static void Main(string[] args)
        {
            FieldBorders field = new FieldBorders(Constants.MAX_ROWS + 2,
                                                  Constants.MAX_COLS + 2, 0, 0);

            UI.PrintField(field);

            Ocean aOcean = new Ocean(new Coordinate(field.LeftTopAngle.X + 1,
                                                    field.LeftTopAngle.Y + 1) /*,5, 15, 3, 3, 3*/);

            aOcean.Run(1000);

            Console.ReadKey();
        }