3 #ifndef OSL_SACRIFICECHECK_H
4 #define OSL_SACRIFICECHECK_H
15 template<
class RecordStack>
16 static int count2(
const RecordStack& record_stack,
17 const MoveStack& history,
21 while (history.hasLastMove(i+1) && (i+1 <= history_max))
24 assert(record_stack.hasLastRecord(i));
26 if ((! last_record) || (! last_record->inCheck()))
28 const Move last_move = history.lastMove(i);
31 if (static_cast<int>(record_stack.size()) <= i)
34 const Move last_last_move = history.lastMove(i+1);
35 if ((last_last_move.
to() != last_move.
to())