This respository will create the Camouflage puzzle. See the examplepuzzle.pdf
Rules of the Puzzle
Structuring this work:
- Create a Word Bank
- Create an AnswerKey From the Word Bank
- Create a Puzzle From the Answer Key
- Create a tangible output from a Puzzle
- Structure and properties to tie all of these together
Other:
Place each of the 26 letters of the alphabet once in the grid below to form a common word of five or more letters reading across in each line. Not all the letters in each line will be used; it's up to you to determine which ones are needed. Some letters may fit in more than one of the empty squares to form familiar words; however, only one arrangment of all of the letters of the alphabet will complete a word in each row. Hyphenated words, proper nouns, and plurals are not used.
Yes, we know that all of this technical stuff is great, but some people are here just for the puzzles.
Here is where I've uploaded some of the puzzles created with this repository. I'll continue to upload puzzles here. https://github.com/TurnUpTheMike/CamouflagePuzzle/tree/master/camo/out/puzzles_to_play
Answer keys: https://github.com/TurnUpTheMike/CamouflagePuzzle/tree/master/camo/out/answer_keys
The naming of these files includes a timestamp of when the puzzle was created. Match the number in the filenames to determine which answerkey is for which puzzle.
No hypenated word
No proper nouns
No plurals
Minimum length of 5 letters
Maximum length of 13 letters
We should read a directory of AnswerKeys to create a NegativeWord Bank to not have the same word appear in multiple AnswerKeys
Should this Word Bank really be 26 separate word banks?
'a' => Bank of Words for letter 'a'
Choose words from the Word Bank
The letter chosen must be index 6 of the word, and the word must fit within the puzzle.
Write to a ?txt? file this answer key for future negative word banks
How well can we choose words such that letters could go in multiple places?
Randomize the rows the of the answer
Add letters to pad out the length of the answer key to 13 characters
Do we add more common letters to make the word less obvious?
I'm thinking of a .pdf or a .html file. Something that we can print out.
How do we kick this off? command line? What properties do we accept?
WordBank source dir?
Negative wordbank source dir?
Output dir?
Puzzle row character length? currently 13
Minimum word length? currently 5
What determines puzzle difficulty? How can we make more difficult puzzles?
Running Unit Tests
cd CamouflagePuzzle/camo
Run all the tests
python3 -m unittest
Run a specific test
python3 -m unittest solution.test.testpuzzle.TestPuzzleGenerator.test_create_right_padding
Running End To End
cd CamouflagePuzzle/camo
Run with all defaults
python3 camouflage.py
Run hardcoded version: The same puzzle everytime
python3 camouflage.py --bank-generator hardcoded
Run AZFirstItem: This creates an easier puzzle randomly choosing words and letters
python3 camouflage.py --answerkey-generator azfirstitem
Run Pants way: This creates a more difficult puzzle attempting to make the answer look like multiple solutions
python3 camouflage.py --answerkey-generator pants
This flag will create a pdf and an answerkey txt
python3 camouflage.py --do-package-puzzle
The default answerkey filename is answerkey_{}.txt and a timestamp will be formatted into the filename
You can override the output answerkey filename with
python3 camouflage.py --do-package-puzzle --answerkey-txt-name favorite_puzzle_name.txt
You can override the output puzzle pdf name with
python3 camouflage.py --do-package-puzzle --puzzle-pdf-name favorite_puzzle.pdf
This runs on python versions 3.4, 3.5, 3.6, 3.7, 3.10
Python dependencies are stored in requirements.txt
Install these python site packages by running pip install -r requirements.txt
The package wkhtmltopdf
used to create pdfs is not able to be installed via pip.
wkhtmltopdf --version
wkhtmltopdf 0.12.6 (with patched qt)