alexobviously / alexobviously/bishop
Make en passant more flexible
- Dominant language
- Dart
- Stars
- 23
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Original comment: Should probably roll `enPassant` and `firstMoveRanks` into one `EnPassantOptions` class, to match the new paradigm and clean up all the chess-specific stuff in `Variant`.
But I've also realised that there are some more complex versions of en passant that we probably want to support. For example, when pawns can move 3+ spaces on the first move, it should be possible to capture them en passant on *any* of the intermediate squares (see: [wildebeest chess](https://en.wikipedia.org/wiki/Wildebeest_chess), [chess on a really big board](https://en.wikipedia.org/wiki/Chess_on_a_really_big_board)).
I think the solution is to make en passant an implementation of the upcoming custom move generator, and have the en passant options param at the variant level just compile to a custom generator.
Another issue is with storing en passant squares in the state and zobrist hash. I think we can safely make it a list of ints in the state, and maybe just store one in the hash.
Contributor guide
Assessment
This issue has not been assessed yet.