Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.24 KB

README.org

File metadata and controls

51 lines (40 loc) · 1.24 KB

Qlocktwo word matrix layouter

Say you want to create a qlocktwo clone. Now you have a set of words that you need to layout on a (LED) matrix. What is the ideal layout for your particular set of words? This code will help you find it.

Usage

Change the words in core.clj to your language. Choose the size of your matrix. Then run the code and pick a layout.

$ lein run

Be aware that this is a complex problem. Depending on your language the search space can be in the billions. For the particular dialect of Swiss German that I’m looking at there are 22992076800 possible solutions.

qlocktwo-words.core> (*
			(combo/count-permutations minutes)
			(combo/count-permutations prepositions)
			(combo/count-permutations hours))
22992076800

Examples

qlocktwo-words.core> (first (layouts words))
[["jetz" "isch"]
 ["föif" "zää"]
 ["viertel"]
 ["zwänzg" "ab"]
 ["vor" "halbi"]
 ["eis" "zwöi"]
 ["drü" "vieri"]
 ["föifi" "sibni"]
 ["sächsi" "nüni"]
 ["achti" "zääni"]
 ["elfi" "zwölfi"]]

License

Copyright © 2018 Christian Egli

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.