fairy-stockfish / Fairy-Stockfish

chess variant engine supporting Xiangqi, Shogi, Janggi, Makruk, S-Chess, Crazyhouse, Bughouse, and many more
https://fairy-stockfish.github.io/
GNU General Public License v3.0
617 stars 194 forks source link

New fairy piece type: the Lancer #167

Open Fantactic1 opened 4 years ago

Fantactic1 commented 4 years ago

(My apologies if this is not the correct forum... let me know if I should paste this on another GitHub forum).

I'm not a programmer, so I'm reaching out to see who might want to try this... I've spoken with a few programmers who said that creating this piece type would be difficult (or at least, tedious). I can certainly understand why, as I know that currently Fairy Stockfish can mostly handle the basic "leaper" squares and sliding patterns that are symmetrical. In case anyone wants to try programming it in, here is the piece I was hoping to see on Fairy SF:

The Lancer It is oriented and moves straight forward in one direction (8 possible directions if not on the edge of the board)- jumping over multiple friendly units if desired. It can move to any available square that it is facing up to and including the first enemy unit in that direction. It cannot jump over an enemy unit or land on any square beyond that first enemy unit. The movement/capture does not have to involve jumping over a piece. After it lands on an empty square or captures a unit, as part of the same move, the player can turn the lancer to one of the other 7 primary directions – or may leave the lancer facing the same direction it just moved. It may not re-orient/turn on its current square as the player's turn, so it MUST move first.

It exists in the variant called 8-Piece Chess on the website vchess.club. However, I was hoping to eventually see it on Pychess and I have a variant idea which has simple move/capture rules that Fairy Stockfish could easily handle. Here's the opening setup:

Full_Cavalry

While I don't know much about coding, I would imagine that having each Lancer direction be its own piece (i.e. Lancer_South, Lancer_Northwest, etc.) and moving the lancer automatically gives the promotion option (only to the lancer directions of course).

ianfab commented 4 years ago

Yes, this is the right place for such a feature request. However, as I mentioned elsewhere, the rotation of the lancer (or the promotion if simulated as such) would introduce quite some additional complexity to the code base, which would be an overhead for maintenance, therefore I currently do not plan to implement the variant, but we can keep this issue open as a feature request.

Fantactic1 commented 4 years ago

Understood, we'll leave it here if anyone has any coding methods to suggest. A good example of an easy OTB piece to understand and play with, yet challenging to code for!