3 #ifndef _LIBERTYESTIMATOR_H
4 #define _LIBERTYESTIMATOR_H
15 template <
class State>
18 unsigned int& proof_number,
19 unsigned int& disproof_number)
22 const Square king_position = state.kingSquare(defender);
28 template <
class State>
30 unsigned int& proof_number,
31 unsigned int& disproof_number)
46 template <
class State>
48 unsigned int& proof_number,
unsigned int& disproof_number);
50 template <
class State>
52 unsigned int& proof_number,
unsigned int& disproof_number);
59 template<
typename State>
62 unsigned int& proof_number,
unsigned int& disproof_number)
66 (attacker, state, info, move, proof_number, disproof_number);
69 if (state.hasMultipleEffectAt(defender, move.
to()))
74 const int attack_support = state.countEffect(attacker,to);
75 const int defense_support = state.countEffect(defender,to);
76 if ((attack_support + (from.
isPieceStand() ? 1 : 0)) > defense_support)
85 if ((capturePtype ==
SILVER)
86 || (capturePtype ==
GOLD))
103 template<
typename State>
106 unsigned int& proof_number,
unsigned int& disproof_number)
122 if ((state.countEffect(attacker,to) + (move.
isDrop() ? 1 : 0))
123 <= state.countEffect(
alt(attacker),to))