NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Bishop is a chess logic package with flexible variant support.
Last release 2 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 6 months
Nearly every release is documented
notes for 47 of 47 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
47 releases · first in 2021
One column per quarter.
Fixed Chess960 short castling in the case where the king is on B and rook is on C.
Separated the ideas of 'castling piece' and 'royal piece'. PieceType now has a castling field which determines whether a piece can castle. By default
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.MiscVariants.extinction()): game ends when a player doesn't have at least one of each piece type.Fixed an error with castling rights changes when a rook takes a rook.
Potentially breaking : FEN strings without castling rights specified now default to no castling rights, instead of all castling rights (thanks @govind
H and E into account (thanks @malaschitz).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 transformVisionAreaStateTransformer 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.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.GatingMove is its own type which contains a child move.SubtractRegion, XorRegion, SetRegion and DirectionSetRegion.Variant.regions are now built into a more efficient form when the variant is built.BoardRegions can now be combined using the +, -, & and ^ operators.LargeVariants.tenCubed()): 10x10 board with fairy pieces.LargeVariants.opulent()): a variant of Grand.ShapeVariants.troitzky()): vaguely circular shaped board.ShapeVariants.omega()): experimental version - mostly working except for en-passant on long pawn moves.OtherGames.kono()): win by moving all of your pieces to your opponent's start position.OtherGames.joust()): the square a piece moves from is removed from the board each time it moves.FairyVariants.wolf()): an 8x10 variant with several fairy pieces.MiscVariants.knightmate()): royal knight instead of king, common kings instead of knights.MiscVariants.pocketKnight()): chess but each player has an extra knight in hand.OtherGames.breakthrough()): only (modified) pawns, move one to the end to win.FairyVariants.newZealand()): rooks capture like knights, knights capture like rooks.FairyVariants.nightrider()): knights are replaced with nightriders.CommonVariants.shatranj()): an ancient form of chess.ActionFillRegionEnding: the end condition for Kono.ActionBlockOrigin: implements the behaviour for Joust.Fixed a castling bug (queenside allowed with piece on b1).
example.dart: can export PGN and use the engine.OtherGames.clobber()) and Clobber 10 (OtherGames.clobber10()).Further optimisation: excluding piece types early from attack checks (~20% performance boost).
A lot of old deprecated constants and functions have been removed.
BoardRegion is now RectRegion.BoardRegion is now a parent class for RectRegion and other board region types.UnionRegion and IntersectRegion combine multiple BoardRegions with union and intersection respectively.RegionPromotion (PromotionOptions): pieces can promote in specific regions.RegionDropBuilder now allows using region IDs from variant, and separate regions per player (same API as RegionPromotion).FirstMoveOptions (breaking): replaces Variant.firstMoveRanks, supports more flexible first move options.FirstMoveOptions.ranks is still available, and is used by Horde Chess, for example, since not all horde pawns should be double moveable in their initial state.(x,y) atoms, allowing for pieces jumping more than 3 squares in each direction. For example, the 'Giraffe' is (4,1), and the Knight could be rewritten as (2,1) (or (1,2)).MiscVariants.legan()): a diagonally arranged chess variant.FairyVariants.grasshopper()): chess with some extra grasshopper pieces.FairyVariants.berolina()): chess with the Berolina pawn (PieceType.berolinaPawn()).\r related issues).Variant.castlingOptions is now CastlingOptions.none.play.dart example: move filtering commands - moves from x, moves to x, moves captures, moves quiet.BoardSize.isValidSquareName(): check if a square name is valid.Andernach Chess (MiscVariants.andernach()): capturing pieces change colour.
MiscVariants.andernach()): capturing pieces change colour.OtherGames.jesonMor()): knights only, win by entering the central square and leaving it again.ActionTransferOwnership: changes the colour of the moving piece.ActionExitRegionEnding: end the game when a piece leaves a region.Fixed a bug with lame leaper squares being calculated incorrectly.
GameResult.soft defines result types that won't delegalise moves.GameResult.readable: human-readable string describing the result (e.g. 'White won by checkmate').Fixed a bug where en passant captured pieces wouldn't increment in BishopState.pieces.
BishopState.pieces.BishopState.capturedPieces(): used to get the captured pieces in a given state, by comparing to the initial state.
BishopState.capturedPieces(): used to get the captured pieces in a given state, by comparing to the initial state.Fixed an issue with parsing PGNs containing clock annotations (thanks @deathcoder).
Variant.forcedCapture: defines forced capture rule behaviour.GameEndConditions changes: stalemate and elimination are now of type EndType instead of bool, allowing greater flexibility (win, loss or draw).Improved efficiency when making moves from SAN strings or parsing PGNs: the check component of the SAN string can now be skipped.
PieceType.withAction(), PieceType.withRegionEffect(), Variant.withAction(), Variant.withRegion() fluent helpers.
PieceType.withAction(), PieceType.withRegionEffect(), Variant.withAction(), Variant.withRegion() fluent helpers.MoveMeta.prettyName is now MoveMeta.formatted.GameNavigator: a helper class that simplifies navigating through a completed game. This is still an early form.
GameNavigator: a helper class that simplifies navigating through a completed game. This is still an early form.parsePgn(), gameFromPgnData(), Game.fromPgn(), GameNavigator.fromPgn().State now contains a StateMeta? meta field: this contains a reference to the variant as well as string representations of moves. This will only be added to mainline moves (i.e. normal calls to makeMove, not legality check moves), so it doesn't affect speed, and improves usability.Variant.startPosBuilder changes: now is a class (StartPositionBuilder), so it can be serialised, and start position build functions now take an option
Variant.startPosBuilder changes: now is a class (StartPositionBuilder), so it can be serialised, and start position build functions now take an optional seed.Fixed a bug that would cause hands parsed from FEN strings to be incorrect.
Refactored Move objects, and the logic responsible for making moves in Game.
Move objects, and the logic responsible for making moves in Game.
Move is now an interface that other more specific move types implement.StandardMove implements most of the behaviour that the previous Move object did.DropMove for drops. PassMove for the new passing move.MoveDefinition has been abstracted in the same way, though the implementations don't directly match Move implementations.EffectSetCustomState to change a state variable. You can define a number of variables equal to the amount of squares on your board, so 64 for a standard chess board.trigger.getCustomState() in triggers, or Game.getCustomState() otherwise.Variant.passOptions: allow pass moves, where the turn changes but nothing happens. Allows for custom conditions.ActionPointsEnding: leverages custom state to define a game end condition based on points.ActionImmortality: allows for pieces of certain types, or with certain flags, to be uncapturable.RegionDropBuilder: define drop rules that only allow drops within a specified region.Orda.orda()) and Orda Mirror (Orda.ordaMirror()).MiscVariants.domination()): keeping pieces in the centre of the board accumulates points for their owner.MiscVariants.dart()): cramped variant on a 6x6 board. Each player has 3 'darts' they can drop onto the board, which block movement and cannot be moved or captured.ActionCheckPieceCount: allows for win conditions based on elimination of arbitrary pieces.
ActionCheckPieceCount: allows for win conditions based on elimination of arbitrary pieces.Variant.forbidChecks: if true, it is impossible for anyone to deliver a check.MiscVariants.kinglet()): game is won when opponent has no pawns.MiscVariants.threeKings()): players have three kings, and capturing any one results in a win.CommonVariants.racingKings()).Custom drop move generation is now possible with Variant.handOptions.dropBuilder.
Variant.handOptions.dropBuilder.Xiangqi.mini()), Manchu (Xiangqi.manchu()), Hoppel-Poppel (FairyVariants.hoppelPoppel()), Shako (LargeVariants.shako()), Dobutsu (Dobutsu.dobutsu()).Variant.withCampMate(): helper method to add the campmate end condition to a variant.Variant.withPieces() and Variant.withPiecesRemoved() helpers.JSON Serialisation support: Variant.fromJson() and Variant.toJson().
Variant.fromJson() and Variant.toJson().A powerful new action system with an accessible API for creating custom game logic. Trigger actions on certain events and execute them if their condit
PromotionOptions. This allows for more versatile promotion move generation, including cases like limiting the number of pieces of a certain type, conditional promotions, non-rank based promotion areas, etc.PieceType definitions now take PiecePromoOptions object that encapsulates its promotion behaviour. It is possible to define pieces that only have specific promotion options here (e.g. like Shogi).BishopState, instead of a single list in Game being modified. This improves code readability and also results in small performance improvements in most cases.Game.result to see the exact way the game ended (null if it's still ongoing). Old getters like Game.checkmate still exist but result is preferred.Variant.gameEndConditions now takes a GameEndConditionsSet, allowing for asymmetric end conditions.GameEndConditions now allows disabling stalemate (resulting in a loss for the stalemated player), and elimination losses (when all pieces are removed).
Variant.hands boolean option replaced with HandOptions, allowing for variants where hands are enabled but captured pieces aren't added to them (pieces can now be added through actions - see Variant.spawn() example).PieceType and MoveDefinition are now immutable, and are normalised with copyWith methods instead of mutation.Fixed gates being output the wrong way round in FEN strings for fixed gating variants.
Added variant: King of the Hill.
moveHistory, moveHistoryAlgebraic and moveHistorySan.Switched to standard symbols for Xiangqi, i.e. Elephants are 'B' and Horses are 'N'.
Board regions and region effects - these allow custom behaviour to be defined for pieces that are in specific areas of the board, and the ability to r
Support for hopper pieces, such as the Grasshopper and Xiangqi Cannon, and Betza modifiers 'p' and 'g'.
Fixed a bug in premove generation where quiet moves to opponent occupied squares weren't generating (e.g. pawn step forward onto opponent's piece).
List<Move>, for filtering moves more fluently.Some convenience methods on Variant: pieceSymbols and commonPieceSymbols.
Variant: pieceSymbols and commonPieceSymbols.CastlingOptions are now static const.CastlingOptions.copyWith() and MaterialConditions.copyWith();Variant is now an immutable data type, which is converted to BuiltVariant when it's used in Game.
Variant is now an immutable data type, which is converted to BuiltVariant when it's used in Game.fenBuilder parameter in Game constructor, overrides variant.startPosBuilder.Game.makeMoveString() and Game.makeMultipleMoves().variantFromString() utility function.There are some minor breaking changes, mostly related to CONSTANT_NAMES being changed to camelCase, and otherwise being more logically grouped. Some f…
MaterialConditions.standard() is now MaterialConditions.standard.Fixed flex gating not generating no-drop moves
Support for fixed gating (e.g. gating in Muskteeer chess)
Fixed a Zobrist hashing bug (on captures)
Gating drops and the Seirawan Chess variant
Another small variant (mini - 6x6)
buildRandomPosition() for generating arbitrary random positions, see Variant.miniRandom for an exampleFixed FEN validation for small boards
Fixed another 960 castling bug (370 / BNRKRBNQ)
Fixed a castling bug in some 960 positions (e.g. 938 / RKRNBBQN)
Support loading incomplete FEN strings
Game.validateFen() functionCastlingOptions.useRookAsTarget: formats algebraic moves correctly for Chess960- Premove generation - Game.loadFen() function
Game.loadFen() functionFixed engine not wanting to checkmate you
Fixed CastlingOptions assertion
Independent side castling (e.g. only queenside for Minichess)
Added Game.boardSymbols(), for use with the squares package
Game.boardSymbols(), for use with the squares packagePiece drops & hands (Crazyhouse support)
Your coding agent can read these notes before it upgrades. Set up the MCP server →