1 Index: interface/play_solo.c
2 ===================================================================
3 RCS file: /sources/gnugo/gnugo/interface/play_solo.c,v
4 retrieving revision 1.46
5 diff -u -r1.46 play_solo.c
6 --- interface/play_solo.c 24 Oct 2007 01:56:04 -0000 1.46
7 +++ interface/play_solo.c 15 Jan 2008 07:22:14 -0000
10 #include "liberty.h" /* to get to the stats */
12 +#include "influence.h"
29 SGFTree *score_tree = tree;
30 + signed char safe_stones[BOARDMAX];
31 + float strength[BOARDMAX];
33 + struct influence_data move_influence;
36 /* Default scoring method is ESTIMATE since it's fastest. */
41 sgftreeAddComment(score_tree, text);
44 + /* Find points of territory for white */
45 + set_strength_data(WHITE, safe_stones, strength);
46 + compute_influence(EMPTY, safe_stones, strength, &move_influence,
47 + NO_MOVE, "White territory estimate");
48 + for (ii = BOARDMIN; ii < BOARDMAX; ii++)
50 + if (move_influence.territory_value[ii] > 0.5) {
51 + sprintf(coord, "%c%c", J(ii)+'a', I(ii)+'a');
52 + sgfAddProperty(sgftreeNodeCheck(score_tree), "TW", coord);
53 + printf("TW:%s ", coord);
56 + /* ...and for black */
57 + set_strength_data(BLACK, safe_stones, strength);
58 + compute_influence(EMPTY, safe_stones, strength, &move_influence,
59 + NO_MOVE, "Black territory estimate");
60 + for (ii = BOARDMIN; ii < BOARDMAX; ii++)
62 + if (move_influence.territory_value[ii] < -0.5) {
63 + sprintf(coord, "%c%c", J(ii)+'a', I(ii)+'a');
64 + sgfAddProperty(sgftreeNodeCheck(score_tree), "TB", coord);
65 + printf("TB:%s ", coord);
68 /* For the finish and aftermath methods we compare the score with
69 * what's stored in the game record.