Solve a Numbrix puzzle: Difference between revisions
m
C# added a remark.
(Added C#) |
m (C# added a remark.) |
||
Line 368:
=={{header|C sharp}}==
The same solver can solve Hidato, Holy Knight's Tour, Hopido and Numbrix puzzles.<br/>
The input can be an array of strings if each cell is one character.
Any non-numeric value indicates a no-go.<br/>
If there are cells that require more characters, then a 2-dimensional array of ints must be used. Any number < 0 indicates a no-go.
<lang csharp>using System.Collections;
Line 380 ⟶ 381:
private static readonly (int dx, int dy)[]
//other puzzle types elided
numbrixMoves = {(1,0),(0,1),(-1,0),(0,-1)};
|