Solve a Hopido puzzle: Difference between revisions

(Added Go)
Line 830:
6 25 12
3 </pre>
 
=={{header|Julia}}==
Uses the Hopido puzzle solver module, which has its source code listed in the Hopido task.
<lang julia>using .Hopido # the . here means to look locally for the module rather than in the libraries
const hopidomoves = [[-3, 0], [0, -3], [-2, -2], [-2, 2], [2, -2], [0, 3], [3, 0], [2, 2]]
 
board, empties, fixed, starts = hidatoconfigure(hopid)
printboard(board, " 0", " ")
hidatosolve(board, hopidomoves, fixed, starts[1][1], starts[1][2], 1, 1, empties + length(fixed))
printboard(board)
</lang>{{output}}<pre>
0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0
0 0 0
0
 
4 15 5 16
1 22 25 2 21 24 27
14 11 8 17 12 9 6
3 20 23 26 19
13 10 7
18
</pre>
 
 
=={{header|Kotlin}}==
4,103

edits