]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Don't prune discovered checks
[stockfish] / src / types.h
index 1842eb2a3ea1eb2b08b9663644f575a7b4347256..eea31e3b6f229cf8cc72b1abcdb8c363fce88216 100644 (file)
@@ -130,6 +130,12 @@ enum MoveType {
   CASTLE    = 3 << 14
 };
 
+enum CheckType {
+  NO_CHECK,
+  DIRECT_CHECK,
+  DISCO_CHECK
+};
+
 enum CastleRight {  // Defined as in PolyGlot book hash key
   CASTLES_NONE = 0,
   WHITE_OO     = 1,
@@ -490,15 +496,15 @@ inline const std::string square_to_string(Square s) {
 /// Our insertion sort implementation, works with pointers and iterators and is
 /// guaranteed to be stable, as is needed.
 template<typename T, typename K>
-void sort(K first, K last)
+void sort(K begin, K end)
 {
   T tmp;
   K p, q;
 
-  for (p = first + 1; p < last; p++)
+  for (p = begin + 1; p < end; p++)
   {
       tmp = *p;
-      for (q = p; q != first && *(q-1) < tmp; --q)
+      for (q = p; q != begin && *(q-1) < tmp; --q)
           *q = *(q-1);
       *q = tmp;
   }