Releases: alexobviously/bishop
Releases · alexobviously/bishop
1.4.3
- Separated the ideas of 'castling piece' and 'royal piece'.
PieceType
now has acastling
field which determines whether a piece can castle. By default this is equal toroyal
, so most users don't need to worry about it - this is backwards compatible. - The non-royal king in Kinglet chess can now castle.
- Variant: Extinction (
MiscVariants.extinction()
): game ends when a player doesn't have at least one of each piece type.
1.4.2
- Fixed an error with castling rights changes when a rook takes a rook.
- Fixed incorrect PGN formatting when the first move was black (thanks @govind-maheshwari2).
1.4.1
- Now using Dart 3!
- Potentially breaking: FEN strings without castling rights specified now default to no castling rights, instead of all castling rights (thanks @govind-maheshwari2).
- Fixed Seirawan chess mating conditions not taking
H
andE
into account (thanks @malaschitz). - Fixed Chess960 castling moves not working in some cases where the rook would land on the square after the king (thanks @malaschitz).
1.4.0
- Custom move generation and processing (beta):
MoveGenerator
: optionally supply a list of these inVariant.moveGenerators
. These can be used to generate custom moves based on the state. You can generate both normal move types (e.g. add an extra move to a piece on a certain square or something), or totally different types of move that can be managed byMoveProcessor
.MoveProcessor
: supply a list of these inVariant.moveProcessors
to process custom move types.
StateTransformer
: a way to transform game states based on player perspectives.Variant.stateTransformer
takes aStateTransformer
that defines how the state is transformed.BishopState.transform([int? player])
orBuiltVariant.transformState()
will return a transformed state (or the same state if there is no transformer). It's possible to define a transformer that takesplayer: null
and transforms the state regardless of player. This option exists for cases where you always want to transformVisionAreaStateTransformer
applies a mask to the board based on a vision radius around pieces.MaskedState
is a subclass ofBishopState
which contains the [mask] used to create it (for cases where e.g. you want to draw the mask on a board).HideFlagsStateTransformer
hides the flags for all of the player's or opponent's pieces, depending on configuration.
- King attacks are calculated in advance for mainline moves and can be accessed with
state.meta!.checks!
. They come in the form of a list of squares containing pieces that are attacking the king of each player. Game.evaluate()
now takes pieces in hands into account.- Gating move logic is no longer part of the standard move logic.
GatingMove
is its own type which contains a child move. SubtractRegion
,XorRegion
,SetRegion
andDirectionSetRegion
.- Regions in
Variant.regions
are now built into a more efficient form when the variant is built. BoardRegion
s can now be combined using the+
,-
,&
and^
operators.- Variants:
- TenCubed (
LargeVariants.tenCubed()
): 10x10 board with fairy pieces. - Opulent (
LargeVariants.opulent()
): a variant of Grand. - Troitzky (
ShapeVariants.troitzky()
): vaguely circular shaped board. - Omega (
ShapeVariants.omega()
): experimental version - mostly working except for en-passant on long pawn moves. - Five Field Kono (
OtherGames.kono()
): win by moving all of your pieces to your opponent's start position. - Joust (
OtherGames.joust()
): the square a piece moves from is removed from the board each time it moves. - Wolf (
FairyVariants.wolf()
): an 8x10 variant with several fairy pieces. - Knightmate (
MiscVariants.knightmate()
): royal knight instead of king, common kings instead of knights. - Pocket Knight (
MiscVariants.pocketKnight()
): chess but each player has an extra knight in hand. - Breakthrough (
OtherGames.breakthrough()
): only (modified) pawns, move one to the end to win. - New Zealand Chess (
FairyVariants.newZealand()
): rooks capture like knights, knights capture like rooks. - Nightrider Chess (
FairyVariants.nightrider()
): knights are replaced with nightriders. - Shatranj (
CommonVariants.shatranj()
): an ancient form of chess.
- TenCubed (
ActionFillRegionEnding
: the end condition for Kono.ActionBlockOrigin
: implements the behaviour for Joust.