aboutsummaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-08-02 23:16:46 +0000
committerSimon Tatham <anakin@pobox.com>2005-08-02 23:16:46 +0000
commitafe80030e4935fdebfbed24eeae94274cb7f0632 (patch)
treef163f05a40523832c696f7d0c69c0493059dae95 /net.c
parent207c847553a978c6fcdb6269dc2b0add3c99a109 (diff)
downloadpuzzles-afe80030e4935fdebfbed24eeae94274cb7f0632.zip
puzzles-afe80030e4935fdebfbed24eeae94274cb7f0632.tar.gz
puzzles-afe80030e4935fdebfbed24eeae94274cb7f0632.tar.bz2
puzzles-afe80030e4935fdebfbed24eeae94274cb7f0632.tar.xz
New puzzle: `Slant', picked from the Japanese-language section of
nikoli.co.jp (which has quite a few puzzles that they don't seem to have bothered to translate into English). Minor structural change: the disjoint set forest code used in the Net solver has come in handy again, so I've moved it out into its own module dsf.c. [originally from svn r6155]
Diffstat (limited to 'net.c')
-rw-r--r--net.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/net.c b/net.c
index a788d46..71c2b9d 100644
--- a/net.c
+++ b/net.c
@@ -382,29 +382,6 @@ static char *validate_params(game_params *params, int full)
* avoidance is required.
*/
-static int dsf_canonify(int *dsf, int val)
-{
- int v2 = val;
-
- while (dsf[val] != val)
- val = dsf[val];
-
- while (v2 != val) {
- int tmp = dsf[v2];
- dsf[v2] = val;
- v2 = tmp;
- }
-
- return val;
-}
-
-static void dsf_merge(int *dsf, int v1, int v2)
-{
- v1 = dsf_canonify(dsf, v1);
- v2 = dsf_canonify(dsf, v2);
- dsf[v2] = v1;
-}
-
struct todo {
unsigned char *marked;
int *buffer;