>Dragan,
>
>I started level 12 with 195137, I got the script taking too long warning the end of 11 and then again when I got level 12 finished, but it hung and never gave me the score or ability to proceed to 13.
Finished level 14 at 1,631,244 after no less than ten warnings. The last moves take just too long.
I think this code suffers from running into a n**2 slowdown - it seems to check each two segments for crossing, and it bails out of the loop as soon as it finds one. By the end of the game, it has too many possible pairs to check. Wish this guy used arrays and updated the lines you just moved, plus any lines that were crossing them before the move, and kept just a number of intersections. Once it reaches zero, done.
OTOH, got to admire a guy who crams something like this into just 7K nowadays.