Solve a Hidato puzzle: Difference between revisions

Updated second D entry
(Updated second D entry)
Line 672:
(cell >= 1 && cell <= size));
if (cell > 0)
assert(i == known[cast(size_t)(cell)]);
}
} body {
bool[Cell] pathSeen; // A set.
/*immutable*/ const lines = input.splitLines;
this.nRows = lines.length;
this.nCols = lines[0].split.length;
 
immutable size = nCols * nRows;
this.board.length = new typeof(this.board[0])[size];
this.board[] = emptyCell;
this.known.length = new typeof(this.known[0])[size + 1];
this.flood.length = new typeof(this.flood[0])[size];
 
auto boardMaxMutable = Cell.min;