alexobviously / alexobviously/bishop

Make en passant more flexible

未關閉
#31 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement rule
主要語言
Dart
星號
23
分支
12
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。