You could tell the code that the first X can not have number 1 for example, to ensure it's never easy.
If you want to use frames, then you can use very similar code, instead of using family references, just use frame references, shouldn't be too hard.
Let me have a go, and see what I can do.