Solve a Hopido puzzle: Difference between revisions
=={{header|Racket}}== implementation added
(=={{header|Racket}}== implementation added) |
|||
Line 178:
1
59 tries</pre>
=={{header|Racket}}==
This solution uses the module "hidato-family-solver.rkt" from
[[Solve a Numbrix puzzle#Racket]]. The difference between the two is
essentially the neighbourhood function.
<lang racket>#lang racket
(require "hidato-family-solver.rkt")
(define hoppy-moore-neighbour-offsets
'((+3 0) (-3 0) (0 +3) (0 -3) (+2 +2) (-2 -2) (-2 +2) (+2 -2)))
(define solve-hopido (solve-hidato-family hoppy-moore-neighbour-offsets))
(displayln
(puzzle->string
(solve-hopido
#(#(_ 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 _ _ _)))))
{{out}}
<pre>
</pre>
=={{header|REXX}}==
This REXX program is a slightly modified version of the REXX ''Hidato'' program.
|