18 using namespace osl::move_classifier;
19 if (property == 0 || property == 1) {
23 return property == openLong(state, move);
35 std::ostringstream os;
36 os <<
"B" <<
self << opponent;
42 std::ostringstream os;
43 os <<
"Open" <<
property / 4 <<
property % 4;
53 :
result(r), state(s), move(m)
59 const Piece attacked = state.pieceAt(last_attack);
61 && state.hasEffectIf(move.ptypeO(), move.to(), last_attack))
76 if (move.
ptype() !=
self)
81 if (last_move.
ptype() != attack)
83 const Square last_to = last_move.
to();
84 if (last_to==move.
to())
87 Test action(&result, state, move);
88 state.forEachEffectOfPiece(state.pieceOnBoard(last_to), action);
98 const Square last_to = last_move.
to();
99 if (last_to==move.
to())
102 const Piece last_piece = state.pieceOnBoard(last_to);
106 Test action(&result, state, move);
107 state.forEachEffectOfPiece(last_piece, action);
111 const Player Turn = state.turn();
112 PieceMask pieces = state.piecesOnBoard(Turn) & state.effectedMask(
alt(Turn));
113 mask_t m = pieces.getMask(0);
115 const Piece p = state.pieceOf(m.takeOneBit());
116 if (state.hasEffectByPiece(last_piece, p.
square())
122 #if OSL_WORDSIZE == 32
124 m = pieces.getMask(1);
126 const Piece p = state.pieceOf(m.takeOneBit()+32);
127 if (state.hasEffectByPiece(last_piece, p.
square())
146 +(opponent_type == CAPTURE ?
"c" : (opponent_type == DROP ?
"d" :
"e"));