alexobviously / bishop

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

Mobility Regions #5

Closed alexobviously closed 1 year ago

alexobviously commented 1 year ago

Support for restricting certain piece types to specific areas of the board, for example generals, advisors and elephants in Xiangqi all have their movement restricted to certain areas of the board.

We probably want some MobilityRegion class that takes upper and lower rank and file limits, and maybe just check them in addMove for simplicity.

alexobviously commented 1 year ago

Implemented in 0.6.1 as BoardRegion and RegionEffect.

malaschitz commented 1 year ago

Maybe it could be used for add pawns in crazyhouse ?

alexobviously commented 1 year ago

Maybe it could be used for add pawns in crazyhouse ?

Could do I suppose, but I think "promotable piece can't be placed on promotion ranks" is specific enough.