Skip to content

TurnUpTheMike/CamouflagePuzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CamouflagePuzzle

This respository will create the Camouflage puzzle. See the examplepuzzle.pdf

Rules of the Puzzle

Structuring this work:

Other:


Rules of the Puzzle

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.

Play Created Puzzles

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.


Create a Word Bank

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'

Create an AnswerKey From the Word Bank

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?

Create a Puzzle From the Answer Key

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?

Create a tangible output from a Puzzle

I'm thinking of a .pdf or a .html file. Something that we can print out.

Structure and properties to tie all of these together

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

Other Questions

What determines puzzle difficulty? How can we make more difficult puzzles?

Running Tests

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

Packaging and Creating Artifacts

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

Dependencies

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)

https://github.com/wkhtmltopdf/wkhtmltopdf/releases

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •