Solve a Holy Knight's tour: Difference between revisions
m
→JS ES6
(→{{header|JavaScript}}: added JS (ES6) version (composing generic functions)) |
m (→JS ES6) |
||
Line 1,979:
};
// firstSolution :: {nodeKey: [nodeKey]} -> Int
// nodeKey -> nodeKey ->
// -> {path::[nodeKey], pathLen::Int, found::Bool}
const firstSolution = (dctMoves, intTarget, strStart, strNodeKey, path) => {
const
Line 2,096 ⟶ 2,097:
just: startXY
}), lstGroups)),
strSoln = 'First solution found in c. ' +
intMSeconds + ' milliseconds:\n\n' +
unlines(map(groupLine(cellWidth, ' ', {
Line 2,123 ⟶ 2,124:
0 0 0
First solution found in c.
25 14 23
Line 2,151 ⟶ 2,152:
0 0
First solution found in c.
1 3
Line 2,168 ⟶ 2,169:
[Finished in 7.
=={{header|Lua}}==
|