diff -N -r -u -X .ignore gnugo-copy/engine/worm.c gnugo/engine/worm.c
|
old
|
new
|
|
| 290 | 290 | */ |
| 291 | 291 | if (worm[str].color == OTHER_COLOR(color) |
| 292 | 292 | && worm[str].attack_codes[0] != 0 |
| | 293 | && worm[str].attack_points[0] != pos |
| 293 | 294 | && worm[str].defense_codes[0] != 0) { |
| 294 | 295 | int dcode = find_defense(str, NULL); |
| 295 | 296 | if (dcode < worm[str].defense_codes[0]) { |
| … |
… |
|
| 335 | 336 | * pos. |
| 336 | 337 | */ |
| 337 | 338 | else if (worm[str].color == color |
| 338 | | && worm[str].attack_codes[0] != 0) { |
| | 339 | && worm[str].attack_codes[0] != 0 |
| | 340 | && worm[str].defense_points[0] != pos) { |
| 339 | 341 | int acode = attack(str, NULL); |
| 340 | 342 | if (acode < worm[str].attack_codes[0]) { |
| 341 | 343 | int defense_works = 1; |
| … |
… |
|
| 782 | 784 | if (defense_point != NO_MOVE) |
| 783 | 785 | change_defense(str, defense_point, dcode); |
| 784 | 786 | } |
| | 787 | /* This code doesn't give us nearly anything at all and costs some time. |
| | 788 | * All defending moves should be found directly. On whole regression it |
| | 789 | * gives only a few hits and doesn't change a result of any test. |
| | 790 | */ |
| | 791 | #if 0 |
| 785 | 792 | else { |
| 786 | 793 | /* If the point of attack is not adjacent to the worm, |
| 787 | 794 | * it is possible that this is an overlooked point of |
| … |
… |
|
| 799 | 806 | popgo(); |
| 800 | 807 | } |
| 801 | 808 | } |
| | 809 | #endif |
| 802 | 810 | } |
| 803 | 811 | } |
| 804 | 812 | gg_assert(stackp == 0); |
| … |
… |
|
| 852 | 860 | if (worm[str].defense_codes[0] && !defense_move_known(pos, str) |
| 853 | 861 | && !discarded_move_known(pos, MAX_TACTICAL_POINTS, |
| 854 | 862 | worm[str].discarded_defenses)) { |
| 855 | | if (trymove(pos, color, "make_worms", NO_MOVE)) { |
| | 863 | if (fastlib(pos, other, 0) != 1 |
| | 864 | && trymove(pos, color, "make_worms", NO_MOVE)) { |
| 856 | 865 | if (countlib(pos) > 1) { |
| 857 | 866 | acode = attack(str, NULL); |
| 858 | 867 | if (acode != WIN) |