private CrossWordLine[] ParseRowsLines(CrossWordTask task) { CrossWordLineTask[] rowsTasks = task.RowsTasks; CrossWordLine[] rows = new CrossWordLine[rowsTasks.Length]; for (int rowIndex = 0; rowIndex < rowsTasks.Length; rowIndex++) { Point[] linePoints = Board.GetRow(rowIndex); Group[] groups = rowsTasks[rowIndex].Select(gLen => new Group(gLen)).ToArray(); rows[rowIndex] = new CrossWordLine(groups, linePoints, true, _rowProcessors); } return(rows); }
private IEnumerable <CrossWordLine> ParseColsLines(CrossWordTask task) { CrossWordLineTask[] colsTasks = task.ColumnsTasks; CrossWordLine[] columns = new CrossWordLine[colsTasks.Length]; for (int colIndex = 0; colIndex < colsTasks.Length; colIndex++) { Point[] linePoints = Board.GetColumn(colIndex); Group[] groups = colsTasks[colIndex].Select(gLen => new Group(gLen)).ToArray(); columns[colIndex] = new CrossWordLine(groups, linePoints, false, _columnProcessors); } return(columns); }