/// <summary> /// Метод для создания сетки и робота /// </summary> /// <param name="rowCount">количество строк</param> /// <param name="columnCount">количество столбцов</param> /// <param name="rowPoint">местоположение робота в строке</param> /// <param name="columnPoint">местоположение робота в столбце</param> public void CreateGrid(int rowCount, int columnCount, int rowPoint, int columnPoint) { _robot = new Robot { Row = rowPoint, Column = columnPoint }; _grid = new Grid { RowCount = rowCount, ColumnCount = columnCount, Cells = new Cell[rowCount, columnCount] }; var initCommand = new ViewGrid(_grid, _robot); _visibleGrid.Children.Clear(); _manager = new EmulatorManager(_visibleGrid, _grid.Cells, rowCount, columnCount); _visibleRobot = _robotInitializer.CreateRobot(Colors.Coral); _manager.AddRobot(_visibleRobot, rowPoint, columnPoint); }