All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
kfendPredictor.cc
Go to the documentation of this file.
1 /* kfendPredictor.cc
2  */
4 
5 bool osl::threatmate::KfendPredictor::predict(const NumEffectState& state,
6  const Move move){
7  const Player turn = alt(state.turn());
8  const Square opKingSquare = state.kingSquare(alt(turn));
9 
10  // Capture Piece
11  if (move.capturePtype())
12  return true;
13 
14  // Add Effect for King's Neighboring8
15  if ( Neighboring8Direct::hasEffect(state, newPtypeO(turn, move.ptype()),
16  move.to(), opKingSquare) )
17  return true;
18  return false;
19 }
20 
21 // ;;; Local Variables:
22 // ;;; mode:c++
23 // ;;; c-basic-offset:2
24 // ;;; End: