Skip to content

Releases: alexobviously/bishop

1.4.3

30 May 12:13
Compare
Choose a tag to compare
  • Separated the ideas of 'castling piece' and 'royal piece'. PieceType now has a castling field which determines whether a piece can castle. By default this is equal to royal, 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

04 May 05:07
Compare
Choose a tag to compare
  • 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

04 Feb 16:51
Compare
Choose a tag to compare
  • 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 and E 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

31 Jul 07:26
Compare
Choose a tag to compare
  • Custom move generation and processing (beta):
    • MoveGenerator: optionally supply a list of these in Variant.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 by MoveProcessor.
    • MoveProcessor: supply a list of these in Variant.moveProcessors to process custom move types.
  • StateTransformer: a way to transform game states based on player perspectives.
    • Variant.stateTransformer takes a StateTransformer that defines how the state is transformed.
    • BishopState.transform([int? player]) or BuiltVariant.transformState() will return a transformed state (or the same state if there is no transformer). It's possible to define a transformer that takes player: null and transforms the state regardless of player. This option exists for cases where you always want to transform
    • VisionAreaStateTransformer applies a mask to the board based on a vision radius around pieces. MaskedState is a subclass of BishopState 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 and DirectionSetRegion.
  • Regions in Variant.regions are now built into a more efficient form when the variant is built.
  • BoardRegions 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.
  • ActionFillRegionEnding: the end condition for Kono.
  • ActionBlockOrigin: implements the behaviour for Joust.