RCS file: /home/arend/Go/gnugo-rsync/gnugo/engine/worm.c,v
retrieving revision 1.74
diff -u -p -r1.74 worm.c
|
|
|
|
| 1706 | 1706 | } |
| 1707 | 1707 | |
| 1708 | 1708 | |
| | 1709 | /* Find stones, that could live for sure, if player (color) moves |
| | 1710 | * first. |
| | 1711 | */ |
| | 1712 | |
| 1709 | 1713 | void |
| 1710 | 1714 | get_lively_stones(int color, signed char safe_stones[BOARDMAX]) |
| 1711 | 1715 | { |
| … |
… |
|
| 1713 | 1717 | memset(safe_stones, 0, BOARDMAX * sizeof(*safe_stones)); |
| 1714 | 1718 | for (pos = BOARDMIN; pos < BOARDMAX; pos++) |
| 1715 | 1719 | if (IS_STONE(board[pos]) && find_origin(pos) == pos) { |
| 1716 | | if ((stackp == 0 && worm[pos].attack_codes[0] == 0) || !attack(pos, NULL) |
| | 1720 | if ((stackp == 0 && worm[pos].attack_codes[0] == 0) |
| | 1721 | || !attack(pos, NULL) |
| 1717 | 1722 | || (board[pos] == color |
| 1718 | | && ((stackp == 0 && worm[pos].defense_codes[0] != 0) |
| 1719 | | || find_defense(pos, NULL)))) |
| | 1723 | && ((stackp == 0 && worm[pos].defense_codes[0] == WIN) |
| | 1724 | || find_defense(pos, NULL) == WIN))) |
| 1720 | 1725 | mark_string(pos, safe_stones, 1); |
| 1721 | 1726 | } |
| 1722 | 1727 | } |