package knights_tour
Solves the 'Knights Tour' and various 'Poyomino' puzzles
Install
dune-project
Dependency
Authors
Maintainers
Sources
knights_tour-0.0.4.tbz
sha256=dbaafd55fab8dd6a693878310c645c402d7c91e05d62819ae7913908ac17cdf1
sha512=e33e38572ba2e42b876915a74f8e9688a84666d61bc94fa2035d16f2fc6d5bf79d6cc5a2ac1a88d1aa28d8878ec035836df2d7919d2fe9dcd133e1259943ecef
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)"
>