Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: IEnumerable<bool[]> Solve(int, int, int?[], Random, int, int)

Declaration

public static IEnumerable<bool[]> Solve(
    int width,
    int height,
    int?[] clues = null,
    Random randomizer = null,
    int minNumLoops = 1,
    int maxNumLoops = 1
)

Summary

Solves a Slitherlink puzzle on a rectangular grid and returns all solutions found.

Parameters

intwidth Width of the grid in squares.
intheight Height of the grid in squares.
int?[]clues Clues (number of edges that are part of the loop). May be null, in which case all possible Slitherlinks of the specified size are generated.
Randomrandomizer Permits the results to be randomized.
intminNumLoops Minimum number of loops allowed in the solution.
intmaxNumLoops Maximum number of loops allowed in the solution.

Returns

A boolean array for each solution. The array specifies which cells are inside of the loop.