mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Use type_of() to categorize the moves
Needed to rename old MoveType (used in move generation) to GenType. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -22,23 +22,23 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
enum MoveType {
|
||||
MV_CAPTURE,
|
||||
MV_QUIET,
|
||||
MV_QUIET_CHECK,
|
||||
MV_EVASION,
|
||||
MV_NON_EVASION,
|
||||
MV_LEGAL
|
||||
enum GenType {
|
||||
CAPTURES,
|
||||
QUIETS,
|
||||
QUIET_CHECKS,
|
||||
EVASIONS,
|
||||
NON_EVASIONS,
|
||||
LEGAL
|
||||
};
|
||||
|
||||
class Position;
|
||||
|
||||
template<MoveType>
|
||||
template<GenType>
|
||||
MoveStack* generate(const Position& pos, MoveStack* mlist);
|
||||
|
||||
/// The MoveList struct is a simple wrapper around generate(), sometimes comes
|
||||
/// handy to use this class instead of the low level generate() function.
|
||||
template<MoveType T>
|
||||
template<GenType T>
|
||||
struct MoveList {
|
||||
|
||||
explicit MoveList(const Position& pos) : cur(mlist), last(generate<T>(pos, mlist)) {}
|
||||
|
||||
Reference in New Issue
Block a user