alexobviously / bishop

A chess logic package for Dart with flexible variant support
https://pub.dev/packages/bishop
Other
19 stars 8 forks source link

Moves where the piece doesn't move #23

Open alexobviously opened 1 year ago

alexobviously commented 1 year ago

It would be good to support a type of move where a piece can capture without moving itself. Currently this is definitely possible through implementing an action that 'teleports' the piece back to its original square after the move, and this might actually be enough. But it's worth investigating potential value in having this as part of the move definition. I think the decider for this will be whether there are variants with the sort of behaviour already in existence that would require it. Note that it's also possible through an action to only 'teleport' after certain moves.

alexobviously commented 1 year ago

This is very possible now after the move refactor, but we don't have a sensible way to define this. One limited option is a flag on pieces that make their captures behave like this.

alexobviously commented 1 year ago

Betza notation thinks of this as a multileg move (such as the lion in that huge shogi variant) where the piece moves to capture and then moves back again, so pretty much like the action I suggested above, but I might want to optimise this into a specific move type, idk

alexobviously commented 1 year ago

https://www.chessvariants.com/difftaking.dir/rifle.html