package knights_tour
Solves the 'Knights Tour' and various 'Poyomino' puzzles
Install
Dune Dependency
Authors
Maintainers
Sources
knights_tour-0.0.5.tbz
sha256=470c6d1b00b68b3bb6ba38a422a4698350564d803e20e7a7627245a253a7c890
sha512=0548d3c90c25e1dd442b43857d62aac19c98f676fedc344071635bc3ce680543fad3998a8b79fa77d6df3726c85fcf7fe14d692e3c30e5485f91f953f020cd74
doc/src/knights_tour.pentominos/randomize.ml.html
Source file randomize.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14
let rnd = Random.State.make_self_init () let list els = let arr = Array.of_list els in let sz = Array.length arr in for i = 0 to sz - 1 do let choices = sz - i in let pick = Random.State.int rnd choices in let tgt = sz - pick - 1 in let tmp = arr.(pick) in arr.(pick) <- arr.(tgt); arr.(tgt) <- tmp done; Array.to_list arr
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>