[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] small simplification
From: |
Portela Fernand |
Subject: |
[gnugo-devel] small simplification |
Date: |
Fri, 27 Sep 2002 23:39:32 +0200 |
Hi,
I found this a couple minutes ago, while looking for something else...
/nando
Index: engine/reading.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/reading.c,v
retrieving revision 1.77
diff -u -r1.77 reading.c
--- engine/reading.c 26 Sep 2002 20:28:09 -0000 1.77
+++ engine/reading.c 27 Sep 2002 21:35:32 -0000
@@ -5447,15 +5447,7 @@
/* Otherwise calculate the value... */
if (trymove(move, color, "safe_move-A", 0, EMPTY, 0)) {
- int acode = attack(move, NULL);
- if (acode == 0)
- safe = WIN;
- else if (acode == WIN)
- safe = 0;
- else if (acode == KO_A)
- safe = KO_B;
- else if (acode == KO_B)
- safe = KO_A;
+ safe = REVERSE_RESULT(attack(move, NULL));
popgo();
}
else if (is_ko(move, color, NULL)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] small simplification,
Portela Fernand <=