Exemple #1
0
 private static bool NoRemainingUnknownValues(PlayingField puzzle)
 {
     return(!puzzle.values.Any(x => x.KnownValue == 0));
 }
Exemple #2
0
 public static IEnumerable <int> ValuesInRow(PlayingField playingField, int y)
 {
     return(playingField.values.Where(v => v.Y == y && v.KnownValue > 0).Select(f => f.KnownValue));
 }
Exemple #3
0
 public static IEnumerable <int> ValuesInBlock(PlayingField playingField, int x, int y, int blockXOffset, int blockYOffset)
 {
     return(FieldValuesInBlock(playingField, x, y, blockXOffset, blockYOffset).Select(f => f.KnownValue));
 }
Exemple #4
0
 public static IEnumerable <int> ValuesInCollum(PlayingField playingField, int x)
 {
     return(playingField.values.Where(v => v.X == x && v.KnownValue > 0).Select(f => f.KnownValue));
 }
Exemple #5
0
 public static IEnumerable <int> ValuesInBlock(PlayingField playingField, int x, int y)
 {
     return(ValuesInBlock(playingField, x, y, 0, 0));
 }