All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
firstMoveThreatmate.h
Go to the documentation of this file.
1 /* firstMoveThreatmate.tcc
2  */
3 #ifndef SEARCH_FIRSTMOVETHREATMATE_H
4 #define SEARCH_FIRSTMOVETHREATMATE_H
5 #include "osl/move.h"
6 
7 namespace osl
8 {
9  namespace search
10  {
15  {
16  static bool isMember(Move last_move, Square king)
17  {
18  const Ptype captured = last_move.capturePtype();
19  const Square to = last_move.to();
20  return ((captured != PTYPE_EMPTY)
21  || (isMajor(last_move.ptype()))
22  || (abs(to.x() - king.x()) + abs(to.y() - king.y()) < 8));
23  }
24  };
25  }
26 }
27 
28 #endif /* SEARCH_FIRSTMOVETHREATMATE_H */
29 // ;;; Local Variables:
30 // ;;; mode:c++
31 // ;;; c-basic-offset:2
32 // ;;; End: