package knights_tour
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Solves the 'Knights Tour' and various 'Poyomino' puzzles
Install
dune-project
Dependency
Authors
Maintainers
Sources
knights_tour-0.0.6.tbz
sha256=770624ae4e35d5a58188a1f25e16730d186df8bc4397827fe9a798ea5ca574e3
sha512=b6c7b2473ddf321afaac6b668f9c6820fb8cc872abc494b69edfdff4101c6b660645837b04801e2917c38dd9f19f79bb0a7b029d59a58ddf1e3a235659bab099
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)"
>