From 1918e20d132bc9e568eb26f79f4016da2c92c6d6 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 20 Feb 2010 17:15:56 +0100 Subject: [PATCH] board_traits_recompute(): Do not recompute for occupied points --- board.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board.c b/board.c index 70d1cd3..5ac4a5c 100644 --- a/board.c +++ b/board.c @@ -463,6 +463,7 @@ board_traits_recompute(struct board *board) #ifdef BOARD_TRAITS for (int i = 0; i < board->tqlen; i++) { coord_t coord = board->tq[i]; + if (board_at(board, coord) != S_NONE) continue; trait_at(board, coord, S_BLACK).safe = board_safe_to_play(board, coord, S_BLACK); trait_at(board, coord, S_WHITE).safe = board_safe_to_play(board, coord, S_WHITE); if (DEBUGL(8)) { @@ -1119,7 +1120,6 @@ board_play_outside(struct board *board, struct move *m, int f) board->last_move = *m; board->moves++; board_hash_update(board, coord, color); - board_traits_recompute(board); board_symmetry_update(board, &board->symmetry, coord); struct move ko = { pass, S_NONE }; board->ko = ko; @@ -1239,6 +1239,7 @@ board_play_f(struct board *board, struct move *m, int f) board_group_capture(board, group); } board_hash_commit(board); + board_traits_recompute(board); return 0; } else { return board_play_in_eye(board, m, f); -- 2.11.4.GIT