Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

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

Declaration

public static IEnumerable<int[][]> Solve(
    int w,
    int?[] grid,
    bool debugOutput = false
)

Summary

Solves a Numberlink puzzle of the specified size.

Parameters

intw Width of the grid.
int?[]grid A grid containing the numbers to be linked and nulls for the available spaces. The height of the grid is calculated from the array’s length and w.
booldebugOutput Determines whether some information is output to the console during solve.

Returns

Each solution returned is represented as a set of links. Each link is an array of grid locations going from one digit to its matching partner.