Skip to content

Development Notes

Saving puzzle state

The word-detective puzzle in modes daily-puzzle, week-puzzle and puzzle-from-text offer state persistency. That is, the player that refreshes the page won't loose their score. This mechanism is based on cookies, but it is slightly different for puzzle-from-text mode.

Daily-puzzle and week-puzzle modes

In these modes, the corpora (or the brick) is always the same. Therefore, it is enough to save the puzzle json.

Puzzle-from-text

In puzzle-from-text, the corpora varies according to the text uploaded by the player. Nonetheless, we can recognize when the same file has been uploaded. In order to do that, we use a digest algorithm and we use the digest key as part of the cookie key. I am using MD5 as the digest algorithm

Language particularities

Italian numbers

The current italian dictionary (2022-06-18) produces a non-empty flatten traversal string for paths of length 13. That is a lot. That means that exists words with thirteen different letters!

This is kind of unexpected at first glance. However, italian numbers are written all together, so for example:

7.447.00: settemilioniquattrocentoquarantaseimila

This word uses 13 letters: aceilmnoqrstu.

I should remove numbers from the italian dictionary.