diff options
Diffstat (limited to 'src/moves.cpp')
| -rw-r--r-- | src/moves.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/moves.cpp b/src/moves.cpp index 7efd00a..81ea1df 100644 --- a/src/moves.cpp +++ b/src/moves.cpp @@ -70,6 +70,11 @@ void GeneratePawnMoves(Board *b, int from, std::vector<Move> &moves) { } int target = (position.rank + (pawn.color ? -1 : 1)) * 8 + targetFile; + + if (IndexToPosition(target) == b->enPassant && b->canEnpassant) { + // enpasstant!!!!!!! + moves.push_back({position, IndexToPosition(target)}); + } if (b->pieces[target].type != NONE && b->pieces[target].color != pawn.color) { moves.push_back({position, IndexToPosition(target)}); |
