aboutsummaryrefslogtreecommitdiff
path: root/src/moves.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-07-28 15:01:59 +0200
committerAdam <adammegarules1@gmail.com>2026-07-28 15:01:59 +0200
commit5081cd26548a090ebd59ab26a16ea084470c4080 (patch)
tree11fc083306813076256d00c0fcd18a412d9d62a7 /src/moves.cpp
parent530b81fb80159b68598d4b974924d2206f7c9d6a (diff)
improving bot
Diffstat (limited to 'src/moves.cpp')
-rw-r--r--src/moves.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/moves.cpp b/src/moves.cpp
index 664971d..b8d86df 100644
--- a/src/moves.cpp
+++ b/src/moves.cpp
@@ -125,6 +125,9 @@ std::vector<Move> GetPseudoLegalMoves(Game *b) {
if (piece.type == BISHOP) {
GenerateSlidingMoves(b, i, bishop_Moves, moves);
}
+ if (piece.type == KING) {
+ GenerateKingMoves(b, i, moves);
+ };
if (piece.type == ROOK) {
GenerateSlidingMoves(b, i, rook_Moves, moves);
}
@@ -132,9 +135,6 @@ std::vector<Move> GetPseudoLegalMoves(Game *b) {
GenerateSlidingMoves(b, i, rook_Moves, moves);
GenerateSlidingMoves(b, i, bishop_Moves, moves);
}
- if (piece.type == KING) {
- GenerateKingMoves(b, i, moves);
- };
};
return moves;