A competition entry for http://www.wunderdog.fi/wunderkuutio/
- JavasScript, ES6, Babel, Node.js, Mocha, JSHint
- Ruby (1.8.7 because it's pre-installed in the hashicorp/precise64 box I used)
- Ansible, shell scripting, Vagrant, Virtualbox
- TDD
Found a total of 1176 words (see RESULTS.md) in 7157 ms.
- on
npm test
a ruby script reads the two raw txt files and generates two json files; one for words and one for the cube
- words that contain characters which are not present in the cube are filtered out (less work for JavaScript)
- the cube letters are mapped to x, y and z coordinate space
- letter chains are processed recursively
- invalid chains (e.g. 'aak') are cached and the next processed words with these letter chains are ignored immediately
Aimed for readable, testable and modular code. More detailed info in finder.js
and tests.
If you have Vagrant and VirtualBox installed, you can get the project up and running in a matter of minutes:
git clone [email protected]:akinnunen/wunderkuutio.git
cd wunderkuutio
vagrant up
vagrant ssh
cd /vagrant
npm install
npm test
Getting rid of the project is even easier:
exit
vagrant destroy