Completely rewrite the loop-detection algorithm used to check game
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 10 Sep 2005 09:39:29 +0000 (09:39 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 10 Sep 2005 09:39:29 +0000 (09:39 +0000)
commit8aa366aace5c3ccc1545b847808caf65ddc7874f
treee97bc9592afe354e443aea11b4f503a4402f5dda
parente490a96e52c1634be230e34ddb5e0fe8fb666a59
Completely rewrite the loop-detection algorithm used to check game
completion, _again_. In r6174 I changed it from dsf to conventional
graph theory so that it could actually highlight loops as opposed to
just discovering that one existed. Unfortunately, yesterday I
discovered a fundamental graph-theoretic error in the latter
algorithm: if you had two entirely separate loops connected by a
single path, the path would be highlighted as well as the loops.

Therefore, I've reverted to the original dsf technique, combined
with a subsequent pass to trace around each loop discovered. This
version seems to do a better job of only highlighting the actual
loops.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6283 cda61777-01e9-0310-a592-d414129be87e
slant.c