Actually, since then I've found a way to reliably win. It's not a chance game, it's a speed game.
If you click fast enough, you can exceed the 7-tile limit. At which point you can have as many tiles as you want, you won't lose, which trivializes the game. I suspect your code determines failure by checking if the number of tiles is exactly 7, when it should check for 7 or greater.



