]> git.sesse.net Git - stockfish/blobdiff - src/movegen.h
Retire Position::move_is_legal()
[stockfish] / src / movegen.h
index 65d346b49696208aa07816e4e4cb04155c266f84..9f45e250912602003c366f1942412edb56cbc1ff 100644 (file)
@@ -45,7 +45,11 @@ struct MoveList {
   void operator++() { cur++; }
   bool end() const { return cur == last; }
   Move move() const { return cur->move; }
-  int size() const { return int(last - mlist); }
+  size_t size() const { return last - mlist; }
+  bool contains(Move m) const {
+    for (const MoveStack* it(mlist) ; it != last; ++it) if (it->move == m) return true;
+    return false;
+  }
 
 private:
   MoveStack mlist[MAX_MOVES];