Ticket #145: breakin.c.patch

File breakin.c.patch, 1.1 kB (added by draqo, 2 years ago)
  • gnugo/engine/breakin.c

    RCS file: /sources/gnugo/gnugo/engine/breakin.c,v
    retrieving revision 1.26
    diff -u -r1.26 breakin.c
     
    6868enlarge_goal(signed char goal[BOARDMAX]) 
    6969{ 
    7070  int pos; 
    71   for (pos = BOARDMIN; pos < BOARDMAX; pos++) { 
     71 
     72  scan_board(pos, 
    7273    if (board[pos] == EMPTY && !goal[pos]) { 
    7374      int k; 
    7475      int goal_neighbors = 0; 
     
    7879      if (goal_neighbors >= 2) 
    7980        goal[pos] = 2; 
    8081    } 
    81   } 
     82  ) 
    8283} 
    8384 
    8485 
     
    424425    int size = 0; 
    425426 
    426427    memset(goal, 0, BOARDMAX); 
    427     for (pos = BOARDMIN; pos < BOARDMAX; pos++) 
    428       if (ON_BOARD(pos) && territories.segmentation[pos] == k) { 
     428    scan_board(pos, 
     429      if (territories.segmentation[pos] == k) { 
    429430        goal[pos] = 1; 
    430431        if (board[pos] != territories.owner[k]) 
    431432          size++; 
    432       } 
     433          } 
     434        ) 
    433435    if (size < 10) 
    434436      continue; 
    435437 
     
    440442  } 
    441443} 
    442444 
    443 void 
     445inline void 
    444446clear_break_in_list() 
    445447{ 
    446448  num_break_ins = 0;