]> git.sesse.net Git - stockfish/blobdiff - src/movegen.h
Cleanup debug counters
[stockfish] / src / movegen.h
index 723ab8ba1825b06ca5b37126493d35fbc199150e..32fae48329009d106fffebe7a328d28ed27d481b 100644 (file)
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #if !defined(MOVEGEN_H_INCLUDED)
 #define MOVEGEN_H_INCLUDED
 
-////
-//// Includes
-////
-
 #include "position.h"
 
-
-////
-//// Prototypes
-////
-
-extern MoveStack* generate_captures(const Position& pos, MoveStack* mlist);
-extern MoveStack* generate_noncaptures(const Position& pos, MoveStack* mlist);
-extern MoveStack* generate_non_capture_checks(const Position& pos, MoveStack* mlist);
-extern MoveStack* generate_evasions(const Position& pos, MoveStack* mlist);
-extern MoveStack* generate_non_evasions(const Position& pos, MoveStack* mlist);
-extern MoveStack* generate_moves(const Position& pos, MoveStack* mlist, bool pseudoLegal = false);
-extern bool move_is_legal(const Position& pos, const Move m, Bitboard pinned);
-extern bool move_is_legal(const Position& pos, const Move m);
-
+enum MoveType {
+  MV_CAPTURE,
+  MV_NON_CAPTURE,
+  MV_CHECK,
+  MV_NON_CAPTURE_CHECK,
+  MV_EVASION,
+  MV_NON_EVASION,
+  MV_LEGAL,
+  MV_PSEUDO_LEGAL
+};
+
+template<MoveType>
+MoveStack* generate(const Position& pos, MoveStack* mlist);
 
 #endif // !defined(MOVEGEN_H_INCLUDED)