| 986 | |
| 987 | |
| 988 | void undo_0( |
| 989 | Pos * posPoint, |
| 990 | const int depth, |
| 991 | const MoveType& mply, |
| 992 | const std::shared_ptr<ThreadData>& thrp) |
| 993 | { |
| 994 | int h = HAND_ID(posPoint->first[depth], 3); |
| 995 | int s = mply.suit; |
| 996 | int r = mply.rank; |
| 997 | |
| 998 | posPoint->rank_in_suit[h][s] |= bit_map_rank[r]; |
| 999 | posPoint->aggr[s] |= bit_map_rank[r]; |
| 1000 | posPoint->hand_dist[h] += handDelta[s]; |
| 1001 | posPoint->length[h][s]++; |
| 1002 | |
| 1003 | // Changes that we now undo. |
| 1004 | WinnersType const * wp = &thrp->winners[ (depth + 3) >> 2]; |
| 1005 | |
| 1006 | for (int n = 0; n < wp->number; n++) |
| 1007 | { |
| 1008 | int st = wp->winner[n].suit; |
| 1009 | posPoint->winner[st].rank = wp->winner[n].winnerRank; |
| 1010 | posPoint->winner[st].hand = wp->winner[n].winnerHand; |
| 1011 | posPoint->second_best[st].rank = wp->winner[n].secondRank; |
| 1012 | posPoint->second_best[st].hand = wp->winner[n].secondHand; |
| 1013 | } |
| 1014 | } |
| 1015 | |
| 1016 | // ctx-enabled version that reads winners via the SearchContext facade |
| 1017 | static void undo_0_ctx( |
nothing calls this directly
no outgoing calls
no test coverage detected