38 return env.
history.hasLastMove() && move.
to() == env.
history.lastMove().to();
51 return env.
history.hasLastMove(2)
52 && move.
to() == env.
history.lastMove().to()
53 && move.
to() == env.
history.lastMove(2).to();
96 return (state.findAttackAt<
LANCE>(player, position).ptype() ==
LANCE)
97 + state.hasEffectByPtype<
BISHOP>(player, position)
98 + state.hasEffectByPtype<
ROOK>(player, position);
102 return count(state, move.
to(), state.turn()) ==
self
115 const bool vertical = state.hasEffectByPtype<
LANCE>(player, from)
116 || state.hasEffectByPtype<
ROOK>(player, from);
117 const bool diagonal = state.hasEffectByPtype<
BISHOP>(player, from);
118 return diagonal*2+vertical;
127 static int index(
const NumEffectState& state,
Move move)
172 || ! state.hasEffectAt(state.turn(), last_move.
from()))
180 return state.hasEffectIf
210 std::swap(rook1, rook2);
231 return state.pieceOnBoard(front).isEmpty()
233 && !state.isPawnMaskSet(
alt(move.
player()), front.
x());