simon-svn: puzzles: simon

tartarus-commits at lists.tartarus.org tartarus-commits at lists.tartarus.org
Sat Sep 10 10:39:29 BST 2005


SVN root:       svn://ixion.tartarus.org/main
Changes by:     simon
Revision:       6283
Date:           2005-09-10 10:39:29 +0100 (Sat, 10 Sep 2005)

Log message (12 lines):
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.

Modified files:
U   puzzles/slant.c

Links:
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi?rev=6283&view=rev
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/puzzles/slant.c?rev=6283&r1=6282&r2=6283



More information about the tartarus-commits mailing list