private Board CreateBoard() { BoardConfig boardConfig = new BoardConfig(); boardConfig.RowsNumber = _userInterface.GetBoardRowsSize(); boardConfig.ColumnsNumber = _userInterface.GetBoardColumnsSize(); return(new Board(boardConfig)); }
public Board(BoardConfig boardConfiguration) { try { if (boardConfiguration.RowsNumber > 0 && boardConfiguration.ColumnsNumber > 0) { this._board = new BoardField[boardConfiguration.RowsNumber, boardConfiguration.ColumnsNumber]; Initialize(); } } catch (ArgumentException e) { Console.WriteLine(e); } }