measure rate and print every 1000 iterations. got 69869 tries/s
conditional debug message. turned off for TGPuzzle. perf= 2300000 tries/s
cache tiles rotations for better performance. perf=8400000 tries/s
eliminate string allocation for debug messages. perf=17300000 tries/s