Now you can use this code in your browser: scramble and wordtwist
Use this python code to beat her: wordtwist.zip
Now you can beat her at Scramble too!: scramble.zip
You need to have NLTK and Psyco installed to run this code:
If you don't want to bother with installing Psyco, just delete the first two lines of the .py file that say
import psyco psyco.full()There is only a slight difference in speed that is only noticeable when calculating words over 7 letters long.
To use the code, open a terminal and type:
python wordtwist.pyor for Scramble:
python scramble.py
It will ask you to enter the letters on the board and return all the words. For Scramble type the letters from left to right, top to bottom, with no spaces. For a `Qu' type `q'.
Then you just type as fast as you can!
Note: please do not use this on unsuspecting players - it was written solely to defeat Mary.
Let me know if you have trouble with the scripts or ideas for improvement.
Jeff Berry 2008-04-30