public static bool IsSolved(this Color[,] matrix, List <Classifier> rows, List <Classifier> columns) { foreach (var row in rows) { var rowArr = matrix.GetRow(row.Index); foreach (var color in row.Colors) { if (!rowArr.IsSolved(color)) { return(false); } } } foreach (var column in columns) { var colArr = matrix.GetColumn(column.Index); foreach (var color in column.Colors) { if (!colArr.IsSolved(color)) { return(false); } } } return(true); }
private void GenerateColumnClassifiers() { for (int i = 0; i < ColumnCount; i++) { var column = AnswerGrid.GetColumn(i); Columns.Add(new Classifier(i, UsedColors, column)); } }