mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Templetize move generation API
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -21,22 +21,20 @@
|
||||
#if !defined(MOVEGEN_H_INCLUDED)
|
||||
#define MOVEGEN_H_INCLUDED
|
||||
|
||||
////
|
||||
//// Includes
|
||||
////
|
||||
|
||||
#include "position.h"
|
||||
|
||||
enum MoveGeneration {
|
||||
CAPTURES,
|
||||
NON_CAPTURES,
|
||||
NON_CAPTURE_CHECKS,
|
||||
EVASIONS,
|
||||
NON_EVASIONS,
|
||||
ALL_MOVES
|
||||
};
|
||||
|
||||
////
|
||||
//// Prototypes
|
||||
////
|
||||
template<MoveGeneration T>
|
||||
MoveStack* generate(const Position& pos, MoveStack* mlist);
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user