diff options
| author | Adam <adammegarules1@gmail.com> | 2026-07-30 17:19:56 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-07-30 17:19:56 +0200 |
| commit | 0528ed43bb13edd89dfa8a38b9bfca6ba7fd83d6 (patch) | |
| tree | 4b7dbb7d2f2875a761629da5fe290f7680a46bea /src/moves.hpp | |
| parent | 8df9e390a71eeb2835eab06ec4b474c8cad63ecd (diff) | |
optimazing
Diffstat (limited to 'src/moves.hpp')
| -rw-r--r-- | src/moves.hpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/moves.hpp b/src/moves.hpp index 32143f7..282cff8 100644 --- a/src/moves.hpp +++ b/src/moves.hpp @@ -4,15 +4,18 @@ #include "board/board.hpp" #include <vector> -std::vector<Move> GetLegalMoves(Game *g); -std::vector<Move> GetPseudoLegalMoves(Game *g); +std::vector<Move> GetLegalMoves(Game *g, bool GenerateQuietMoves = true); +std::vector<Move> GetPseudoLegalMoves(Game *g, bool GenerateQuietMoves); Position IndexToPosition(int i); void GenerateSlidingMoves(Game *g, int from, const std::array<int, 4> &directions, - std::vector<Move> &moves); -void GenerateKingMoves(Game *g, int from, std::vector<Move> &moves); -void GenerateKnightMoves(Game *g, int from, std::vector<Move> &moves); -void GeneratePawnMoves(Game *g, int from, std::vector<Move> &moves); + std::vector<Move> &moves, bool GenerateQuietMoves); +void GenerateKingMoves(Game *g, int from, std::vector<Move> &moves, + bool GenerateQuietMoves); +void GenerateKnightMoves(Game *b, int from, std::vector<Move> &moves, + bool GenerateQuietMoves); +void GeneratePawnMoves(Game *b, int from, std::vector<Move> &moves, + bool GenerateQuietMoves); bool IsSquareAttacked(Game *g, Position square, bool byWhite); GameState GetNewGameState(Game *g); |
