From 6040d59294cc73953280b3844e7d296df227af4d Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Thu, 30 May 2024 19:12:34 +0700 Subject: [PATCH] Version 1.4.3 --- CHANGELOG.md | 5 +++ example/example_variant.json | 2 +- example/json/andernach.json | 2 +- example/json/antichess.json | 2 +- example/json/atomic.json | 2 +- example/json/berolina.json | 2 +- example/json/breakthrough.json | 2 +- example/json/capablanca.json | 2 +- example/json/chess.json | 2 +- example/json/chess960.json | 2 +- example/json/clobber.json | 4 +- example/json/clobber10.json | 4 +- example/json/crazyhouse.json | 2 +- example/json/dart.json | 6 ++- example/json/dobutsu.json | 2 +- example/json/domination.json | 2 +- example/json/extinction.json | 71 ++++++++++++++++++++++++++++++++++ example/json/grand.json | 2 +- example/json/grasshopper.json | 2 +- example/json/hoppelPoppel.json | 10 +---- example/json/horde.json | 2 +- example/json/jesonMor.json | 2 +- example/json/joust.json | 2 +- example/json/kinglet.json | 4 +- example/json/knightmate.json | 3 +- example/json/kono.json | 2 +- example/json/koth.json | 2 +- example/json/legan.json | 2 +- example/json/manchu.json | 2 +- example/json/micro.json | 2 +- example/json/mini.json | 2 +- example/json/miniRandom.json | 2 +- example/json/miniXiangqi.json | 2 +- example/json/musketeer.json | 2 +- example/json/nano.json | 2 +- example/json/newZealand.json | 46 ++++++++++++++++++++++ example/json/nightrider.json | 46 ++++++++++++++++++++++ example/json/omega.json | 54 ++++++++++++++++++++++++++ example/json/opulent.json | 2 +- example/json/orda.json | 2 +- example/json/ordaMirror.json | 2 +- example/json/pocketKnight.json | 2 +- example/json/racingKings.json | 2 +- example/json/seirawan.json | 2 +- example/json/shako.json | 2 +- example/json/shatranj.json | 41 ++++++++++++++++++++ example/json/shogi.json | 2 +- example/json/spawn.json | 2 +- example/json/tenCubed.json | 2 +- example/json/threeCheck.json | 2 +- example/json/threeKings.json | 2 +- example/json/troitzky.json | 2 +- example/json/wolf.json | 2 +- example/json/xiangqi.json | 2 +- lib/src/constants.dart | 2 +- pubspec.yaml | 3 +- 56 files changed, 322 insertions(+), 61 deletions(-) create mode 100644 example/json/extinction.json create mode 100644 example/json/newZealand.json create mode 100644 example/json/nightrider.json create mode 100644 example/json/omega.json create mode 100644 example/json/shatranj.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 413a06b..a6cc1c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +### 1.4.3 +- 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 - 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). diff --git a/example/example_variant.json b/example/example_variant.json index d8864ba..640725b 100644 --- a/example/example_variant.json +++ b/example/example_variant.json @@ -1,7 +1,7 @@ { "name": "Example", "description": "An example variant for JSON serialisation", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.1", "boardSize": "3x5", "pieceTypes": { "K": { diff --git a/example/json/andernach.json b/example/json/andernach.json index 593eec5..05f9928 100644 --- a/example/json/andernach.json +++ b/example/json/andernach.json @@ -1,7 +1,7 @@ { "name": "Andernach Chess", "description": "Capturing pieces, except for kings, change colour.", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/antichess.json b/example/json/antichess.json index bdef8dd..6fc135f 100644 --- a/example/json/antichess.json +++ b/example/json/antichess.json @@ -1,7 +1,7 @@ { "name": "Antichess", "description": "Lose all your pieces to win.", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/atomic.json b/example/json/atomic.json index 181c21f..af3e770 100644 --- a/example/json/atomic.json +++ b/example/json/atomic.json @@ -1,7 +1,7 @@ { "name": "Atomic Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/berolina.json b/example/json/berolina.json index a0a0503..bf54d9f 100644 --- a/example/json/berolina.json +++ b/example/json/berolina.json @@ -1,7 +1,7 @@ { "name": "Berolina Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/breakthrough.json b/example/json/breakthrough.json index 8a621f2..bded429 100644 --- a/example/json/breakthrough.json +++ b/example/json/breakthrough.json @@ -1,7 +1,7 @@ { "name": "Breakthrough", "description": "", - "bishopVersion": "1.4.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/capablanca.json b/example/json/capablanca.json index 2471ce9..3259756 100644 --- a/example/json/capablanca.json +++ b/example/json/capablanca.json @@ -1,7 +1,7 @@ { "name": "Capablanca Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "10x8", "pieceTypes": { "P": { diff --git a/example/json/chess.json b/example/json/chess.json index ef8dba1..f083ba4 100644 --- a/example/json/chess.json +++ b/example/json/chess.json @@ -1,7 +1,7 @@ { "name": "Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/chess960.json b/example/json/chess960.json index 0174c39..264f41a 100644 --- a/example/json/chess960.json +++ b/example/json/chess960.json @@ -1,7 +1,7 @@ { "name": "Chess960", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/clobber.json b/example/json/clobber.json index 9c2335c..26c0035 100644 --- a/example/json/clobber.json +++ b/example/json/clobber.json @@ -1,11 +1,11 @@ { "name": "Clobber", "description": "", - "bishopVersion": "1.3.2", + "bishopVersion": "1.4.3", "boardSize": "5x6", "pieceTypes": {"P": {"betza": "cW"}}, "castlingOptions": {"enabled": false}, - "promotionOptions": "bishop.promo.standard", + "promotionOptions": "bishop.promo.none", "materialConditions": {"enabled": false}, "gameEndConditions": { "stalemate": "lose", diff --git a/example/json/clobber10.json b/example/json/clobber10.json index 993f222..b8d866a 100644 --- a/example/json/clobber10.json +++ b/example/json/clobber10.json @@ -1,11 +1,11 @@ { "name": "Clobber10", "description": "", - "bishopVersion": "1.3.2", + "bishopVersion": "1.4.3", "boardSize": "10x10", "pieceTypes": {"P": {"betza": "cW"}}, "castlingOptions": {"enabled": false}, - "promotionOptions": "bishop.promo.standard", + "promotionOptions": "bishop.promo.none", "materialConditions": {"enabled": false}, "gameEndConditions": { "stalemate": "lose", diff --git a/example/json/crazyhouse.json b/example/json/crazyhouse.json index 1e65103..8ce22d4 100644 --- a/example/json/crazyhouse.json +++ b/example/json/crazyhouse.json @@ -1,7 +1,7 @@ { "name": "Crazyhouse", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/dart.json b/example/json/dart.json index 9617835..1d12001 100644 --- a/example/json/dart.json +++ b/example/json/dart.json @@ -1,7 +1,7 @@ { "name": "Dart", "description": "", - "bishopVersion": "1.3.2", + "bishopVersion": "1.4.3", "boardSize": "6x6", "pieceTypes": { "P": { @@ -26,6 +26,10 @@ }, "X": { "betza": "", + "promoOptions": { + "canPromote": false, + "canPromoteTo": false + }, "value": 0, "actions": ["bishop.action.immortality"] } diff --git a/example/json/dobutsu.json b/example/json/dobutsu.json index 7f88680..57354dc 100644 --- a/example/json/dobutsu.json +++ b/example/json/dobutsu.json @@ -1,7 +1,7 @@ { "name": "Dobutsu Shogi", "description": "A simple Shogi variant aimed at children.", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "3x4", "pieceTypes": { "L": { diff --git a/example/json/domination.json b/example/json/domination.json index a53058a..8630b4f 100644 --- a/example/json/domination.json +++ b/example/json/domination.json @@ -1,7 +1,7 @@ { "name": "Domination", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/extinction.json b/example/json/extinction.json new file mode 100644 index 0000000..7d7603b --- /dev/null +++ b/example/json/extinction.json @@ -0,0 +1,71 @@ +{ + "name": "Extinction Chess", + "description": "The first player that does not have pieces of all types loses the game.", + "bishopVersion": "1.4.3", + "boardSize": "8x8", + "pieceTypes": { + "P": { + "betza": "fmWfceFifmnD", + "promoOptions": { + "canPromote": true, + "canPromoteTo": false + }, + "enPassantable": true, + "noSanSymbol": true, + "value": 100 + }, + "N": {"betza": "N", "value": 300}, + "B": {"betza": "B", "value": 300}, + "R": {"betza": "R", "value": 500}, + "Q": {"betza": "Q", "value": 900}, + "K": {"betza": "K", "castling": true} + }, + "castlingOptions": { + "enabled": true, + "kTarget": 6, + "qTarget": 2, + "fixedRooks": true, + "kRook": 7, + "qRook": 0, + "rookPiece": "R", + "useRookAsTarget": false + }, + "promotionOptions": "bishop.promo.standard", + "materialConditions": { + "enabled": true, + "soloMaters": ["P", "Q", "R", "A", "C"], + "pairMaters": ["N"], + "combinedPairMaters": ["B"], + "specialCases": [["B", "N"]] + }, + "startPosition": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", + "enPassant": true, + "halfMoveDraw": 100, + "repetitionDraw": 3, + "actions": [ + { + "id": "bishop.action.checkPieceCount", + "pieceType": "P" + }, + { + "id": "bishop.action.checkPieceCount", + "pieceType": "N" + }, + { + "id": "bishop.action.checkPieceCount", + "pieceType": "B" + }, + { + "id": "bishop.action.checkPieceCount", + "pieceType": "R" + }, + { + "id": "bishop.action.checkPieceCount", + "pieceType": "Q" + }, + { + "id": "bishop.action.checkPieceCount", + "pieceType": "K" + } + ] +} \ No newline at end of file diff --git a/example/json/grand.json b/example/json/grand.json index d81bf31..7b9aa00 100644 --- a/example/json/grand.json +++ b/example/json/grand.json @@ -1,7 +1,7 @@ { "name": "Grand Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "10x10", "pieceTypes": { "P": { diff --git a/example/json/grasshopper.json b/example/json/grasshopper.json index 8e92663..2f1a5ce 100644 --- a/example/json/grasshopper.json +++ b/example/json/grasshopper.json @@ -1,7 +1,7 @@ { "name": "Grasshopper Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/hoppelPoppel.json b/example/json/hoppelPoppel.json index 40fb493..8d0835a 100644 --- a/example/json/hoppelPoppel.json +++ b/example/json/hoppelPoppel.json @@ -1,7 +1,7 @@ { "name": "Hoppel-Poppel", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { @@ -38,13 +38,7 @@ "useRookAsTarget": false }, "promotionOptions": "bishop.promo.standard", - "materialConditions": { - "enabled": true, - "soloMaters": ["P", "Q", "R", "A", "C"], - "pairMaters": ["N"], - "combinedPairMaters": ["B"], - "specialCases": [["B", "N"]] - }, + "materialConditions": {"enabled": false}, "startPosition": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", "enPassant": true, "halfMoveDraw": 100, diff --git a/example/json/horde.json b/example/json/horde.json index 32aeaad..fa71fb0 100644 --- a/example/json/horde.json +++ b/example/json/horde.json @@ -1,7 +1,7 @@ { "name": "Horde Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/jesonMor.json b/example/json/jesonMor.json index 52192af..88d5032 100644 --- a/example/json/jesonMor.json +++ b/example/json/jesonMor.json @@ -1,7 +1,7 @@ { "name": "Jeson Mor", "description": "Knights only. Move a knight onto the central square and off it again to win.", - "bishopVersion": "1.3.2", + "bishopVersion": "1.4.3", "boardSize": "9x9", "pieceTypes": {"N": {"betza": "N", "value": 300}}, "castlingOptions": {"enabled": false}, diff --git a/example/json/joust.json b/example/json/joust.json index 2474fb7..a1b22a6 100644 --- a/example/json/joust.json +++ b/example/json/joust.json @@ -1,7 +1,7 @@ { "name": "Joust", "description": "The square a piece moves from is removed from the boardafter each move.", - "bishopVersion": "1.4.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "N": {"betza": "mN"}, diff --git a/example/json/kinglet.json b/example/json/kinglet.json index c3c9184..e1d1dd9 100644 --- a/example/json/kinglet.json +++ b/example/json/kinglet.json @@ -1,7 +1,7 @@ { "name": "Kinglet Chess", "description": "The first player to capture all the opponent's pawns wins.", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { @@ -46,7 +46,7 @@ }, "value": 900 }, - "K": {"betza": "K"} + "K": {"betza": "K", "castling": true} }, "castlingOptions": { "enabled": true, diff --git a/example/json/knightmate.json b/example/json/knightmate.json index d42faa3..2328fa7 100644 --- a/example/json/knightmate.json +++ b/example/json/knightmate.json @@ -1,7 +1,7 @@ { "name": "Knightmate", "description": "", - "bishopVersion": "1.4.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { @@ -17,6 +17,7 @@ "N": { "betza": "N", "royal": true, + "castling": false, "promoOptions": { "canPromote": false, "canPromoteTo": false diff --git a/example/json/kono.json b/example/json/kono.json index e6aaff8..23e1560 100644 --- a/example/json/kono.json +++ b/example/json/kono.json @@ -1,7 +1,7 @@ { "name": "Five Field Kono", "description": "", - "bishopVersion": "1.4.0", + "bishopVersion": "1.4.3", "boardSize": "5x5", "pieceTypes": {"P": {"betza": "mF"}}, "castlingOptions": {"enabled": false}, diff --git a/example/json/koth.json b/example/json/koth.json index 6c35fa7..994aaa4 100644 --- a/example/json/koth.json +++ b/example/json/koth.json @@ -1,7 +1,7 @@ { "name": "King of the Hill", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/legan.json b/example/json/legan.json index d6618b5..b13e643 100644 --- a/example/json/legan.json +++ b/example/json/legan.json @@ -1,7 +1,7 @@ { "name": "Legan Chess", "description": "", - "bishopVersion": "1.3.2", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/manchu.json b/example/json/manchu.json index 3425645..aac2a30 100644 --- a/example/json/manchu.json +++ b/example/json/manchu.json @@ -1,7 +1,7 @@ { "name": "Manchu", "description": "An asymmetric variant of Xiangqi, where red exchanges most oftheir pieces for one very powerful piece.", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "9x10", "pieceTypes": { "K": { diff --git a/example/json/micro.json b/example/json/micro.json index 2fef4bd..851e045 100644 --- a/example/json/micro.json +++ b/example/json/micro.json @@ -1,7 +1,7 @@ { "name": "Micro Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "5x5", "pieceTypes": { "P": { diff --git a/example/json/mini.json b/example/json/mini.json index 7cdf8b9..86972b7 100644 --- a/example/json/mini.json +++ b/example/json/mini.json @@ -1,7 +1,7 @@ { "name": "Mini Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "6x6", "pieceTypes": { "P": { diff --git a/example/json/miniRandom.json b/example/json/miniRandom.json index dd741ee..a9e6e97 100644 --- a/example/json/miniRandom.json +++ b/example/json/miniRandom.json @@ -1,7 +1,7 @@ { "name": "Mini Random", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "6x6", "pieceTypes": { "P": { diff --git a/example/json/miniXiangqi.json b/example/json/miniXiangqi.json index db1c2a4..0d80a31 100644 --- a/example/json/miniXiangqi.json +++ b/example/json/miniXiangqi.json @@ -1,7 +1,7 @@ { "name": "Mini Xiangqi", "description": "A miniature variant of Xiangqi, played on a 7x7 board with no river.", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "7x7", "pieceTypes": { "K": { diff --git a/example/json/musketeer.json b/example/json/musketeer.json index 4bfba5e..1db6276 100644 --- a/example/json/musketeer.json +++ b/example/json/musketeer.json @@ -1,7 +1,7 @@ { "name": "Musketeer Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/nano.json b/example/json/nano.json index c272b97..a16bd28 100644 --- a/example/json/nano.json +++ b/example/json/nano.json @@ -1,7 +1,7 @@ { "name": "Nano Chess", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "4x5", "pieceTypes": { "P": { diff --git a/example/json/newZealand.json b/example/json/newZealand.json new file mode 100644 index 0000000..daf5666 --- /dev/null +++ b/example/json/newZealand.json @@ -0,0 +1,46 @@ +{ + "name": "New Zealand Chess", + "description": "", + "bishopVersion": "1.4.3", + "boardSize": "8x8", + "pieceTypes": { + "P": { + "betza": "fmWfceFifmnD", + "promoOptions": { + "canPromote": true, + "canPromoteTo": false + }, + "enPassantable": true, + "noSanSymbol": true, + "value": 100 + }, + "N": {"betza": "mNcR", "value": 400}, + "B": {"betza": "B", "value": 300}, + "R": {"betza": "mRcN"}, + "Q": {"betza": "Q", "value": 900}, + "K": { + "betza": "K", + "royal": true, + "promoOptions": { + "canPromote": false, + "canPromoteTo": false + } + } + }, + "castlingOptions": { + "enabled": true, + "kTarget": 6, + "qTarget": 2, + "fixedRooks": true, + "kRook": 7, + "qRook": 0, + "rookPiece": "R", + "useRookAsTarget": false + }, + "promotionOptions": "bishop.promo.standard", + "materialConditions": {"enabled": false}, + "startPosition": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", + "enPassant": true, + "halfMoveDraw": 100, + "repetitionDraw": 3 +} \ No newline at end of file diff --git a/example/json/nightrider.json b/example/json/nightrider.json new file mode 100644 index 0000000..9e06f2c --- /dev/null +++ b/example/json/nightrider.json @@ -0,0 +1,46 @@ +{ + "name": "Nightrider Chess", + "description": "", + "bishopVersion": "1.4.3", + "boardSize": "8x8", + "pieceTypes": { + "P": { + "betza": "fmWfceFifmnD", + "promoOptions": { + "canPromote": true, + "canPromoteTo": false + }, + "enPassantable": true, + "noSanSymbol": true, + "value": 100 + }, + "N": {"betza": "N0", "value": 500}, + "B": {"betza": "B", "value": 300}, + "R": {"betza": "R", "value": 500}, + "Q": {"betza": "Q", "value": 900}, + "K": { + "betza": "K", + "royal": true, + "promoOptions": { + "canPromote": false, + "canPromoteTo": false + } + } + }, + "castlingOptions": { + "enabled": true, + "kTarget": 6, + "qTarget": 2, + "fixedRooks": true, + "kRook": 7, + "qRook": 0, + "rookPiece": "R", + "useRookAsTarget": false + }, + "promotionOptions": "bishop.promo.standard", + "materialConditions": {"enabled": false}, + "startPosition": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", + "enPassant": true, + "halfMoveDraw": 100, + "repetitionDraw": 3 +} \ No newline at end of file diff --git a/example/json/omega.json b/example/json/omega.json new file mode 100644 index 0000000..8ad2121 --- /dev/null +++ b/example/json/omega.json @@ -0,0 +1,54 @@ +{ + "name": "Omega Chess", + "description": "", + "bishopVersion": "1.4.3", + "boardSize": "12x12", + "pieceTypes": { + "P": { + "betza": "fmWfceFifmW3", + "promoOptions": { + "canPromote": true, + "canPromoteTo": false + }, + "enPassantable": true, + "noSanSymbol": true, + "value": 100 + }, + "N": {"betza": "N", "value": 300}, + "B": {"betza": "B", "value": 300}, + "R": {"betza": "R", "value": 500}, + "Q": {"betza": "Q", "value": 900}, + "K": { + "betza": "K", + "royal": true, + "promoOptions": { + "canPromote": false, + "canPromoteTo": false + } + }, + "C": {"betza": "DAW", "value": 400}, + "W": {"betza": "FC", "value": 400}, + "*": { + "betza": "", + "promoOptions": { + "canPromote": false, + "canPromoteTo": false + }, + "value": 0, + "actions": ["bishop.action.immortality"] + } + }, + "castlingOptions": { + "enabled": true, + "kTarget": 8, + "qTarget": 4, + "fixedRooks": true, + "kRook": 9, + "qRook": 2, + "useRookAsTarget": false + }, + "promotionOptions": "bishop.promo.standard", + "materialConditions": {"enabled": false}, + "startPosition": "w**********w/*crnbqkbnrc*/*pppppppppp*/*10*/*10*/*10*/*10*/*10*/*10*/*PPPPPPPPPP*/*CRNBQKBNRC*/W**********W w - - 0 1", + "enPassant": true +} \ No newline at end of file diff --git a/example/json/opulent.json b/example/json/opulent.json index 70bbef7..58feeb6 100644 --- a/example/json/opulent.json +++ b/example/json/opulent.json @@ -1,7 +1,7 @@ { "name": "Opulent Chess", "description": "", - "bishopVersion": "1.4.0", + "bishopVersion": "1.4.3", "boardSize": "10x10", "pieceTypes": { "P": { diff --git a/example/json/orda.json b/example/json/orda.json index fe70c97..d4168de 100644 --- a/example/json/orda.json +++ b/example/json/orda.json @@ -1,7 +1,7 @@ { "name": "Orda", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "K": { diff --git a/example/json/ordaMirror.json b/example/json/ordaMirror.json index 073d69d..461b594 100644 --- a/example/json/ordaMirror.json +++ b/example/json/ordaMirror.json @@ -1,7 +1,7 @@ { "name": "Orda Mirror", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "K": { diff --git a/example/json/pocketKnight.json b/example/json/pocketKnight.json index ef4df3d..4a3e58a 100644 --- a/example/json/pocketKnight.json +++ b/example/json/pocketKnight.json @@ -1,7 +1,7 @@ { "name": "Pocket Knight", "description": "", - "bishopVersion": "1.4.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/racingKings.json b/example/json/racingKings.json index 9b497a8..187462e 100644 --- a/example/json/racingKings.json +++ b/example/json/racingKings.json @@ -1,7 +1,7 @@ { "name": "Racing Kings", "description": "The first player to run their king to the finish line wins.", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/seirawan.json b/example/json/seirawan.json index 6ed0b89..f4c5ff1 100644 --- a/example/json/seirawan.json +++ b/example/json/seirawan.json @@ -1,7 +1,7 @@ { "name": "Seirawan Chess", "description": "", - "bishopVersion": "1.4.1", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/shako.json b/example/json/shako.json index df5fd6f..30e0462 100644 --- a/example/json/shako.json +++ b/example/json/shako.json @@ -1,7 +1,7 @@ { "name": "Shako", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "10x10", "pieceTypes": { "P": { diff --git a/example/json/shatranj.json b/example/json/shatranj.json new file mode 100644 index 0000000..a3e568f --- /dev/null +++ b/example/json/shatranj.json @@ -0,0 +1,41 @@ +{ + "name": "Shatranj", + "description": "", + "bishopVersion": "1.4.3", + "boardSize": "8x8", + "pieceTypes": { + "P": { + "betza": "fmWfcF", + "promoOptions": { + "canPromote": true, + "canPromoteTo": false, + "promotesTo": ["Q"] + }, + "noSanSymbol": true, + "value": 100 + }, + "N": {"betza": "N", "value": 300}, + "B": {"betza": "A", "value": 120}, + "R": {"betza": "R", "value": 500}, + "Q": {"betza": "F", "value": 140}, + "K": { + "betza": "K", + "royal": true, + "promoOptions": { + "canPromote": false, + "canPromoteTo": false + } + } + }, + "castlingOptions": {"enabled": false}, + "promotionOptions": "bishop.promo.standard", + "materialConditions": {"enabled": false}, + "gameEndConditions": { + "stalemate": "lose", + "elimination": "lose" + }, + "startPosition": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", + "enPassant": false, + "halfMoveDraw": 100, + "repetitionDraw": 3 +} \ No newline at end of file diff --git a/example/json/shogi.json b/example/json/shogi.json index a93efdd..85349c3 100644 --- a/example/json/shogi.json +++ b/example/json/shogi.json @@ -1,7 +1,7 @@ { "name": "Shogi", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "9x9", "pieceTypes": { "K": { diff --git a/example/json/spawn.json b/example/json/spawn.json index 0a8b931..ec2a8dd 100644 --- a/example/json/spawn.json +++ b/example/json/spawn.json @@ -1,7 +1,7 @@ { "name": "Spawn Chess", "description": "Moving the exposed king adds a pawn to the player's hand.", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/tenCubed.json b/example/json/tenCubed.json index 78cee53..a434923 100644 --- a/example/json/tenCubed.json +++ b/example/json/tenCubed.json @@ -1,7 +1,7 @@ { "name": "TenCubed", "description": "", - "bishopVersion": "1.4.0", + "bishopVersion": "1.4.3", "boardSize": "10x10", "pieceTypes": { "P": { diff --git a/example/json/threeCheck.json b/example/json/threeCheck.json index 5c27086..4d1691e 100644 --- a/example/json/threeCheck.json +++ b/example/json/threeCheck.json @@ -1,7 +1,7 @@ { "name": "Three Check", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/threeKings.json b/example/json/threeKings.json index aeccaa7..942a232 100644 --- a/example/json/threeKings.json +++ b/example/json/threeKings.json @@ -1,7 +1,7 @@ { "name": "Three Kings Chess", "description": "Each player has three kings, but only one has to be captured for them to win.", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "8x8", "pieceTypes": { "P": { diff --git a/example/json/troitzky.json b/example/json/troitzky.json index abeb40a..0d60559 100644 --- a/example/json/troitzky.json +++ b/example/json/troitzky.json @@ -1,7 +1,7 @@ { "name": "Troitzky Chess", "description": "", - "bishopVersion": "1.4.0", + "bishopVersion": "1.4.3", "boardSize": "10x10", "pieceTypes": { "P": { diff --git a/example/json/wolf.json b/example/json/wolf.json index 113f403..32a906c 100644 --- a/example/json/wolf.json +++ b/example/json/wolf.json @@ -1,7 +1,7 @@ { "name": "Wolf Chess", "description": "", - "bishopVersion": "1.4.0", + "bishopVersion": "1.4.3", "boardSize": "8x10", "pieceTypes": { "P": { diff --git a/example/json/xiangqi.json b/example/json/xiangqi.json index 1196176..b54f832 100644 --- a/example/json/xiangqi.json +++ b/example/json/xiangqi.json @@ -1,7 +1,7 @@ { "name": "Xiangqi", "description": "", - "bishopVersion": "1.3.0", + "bishopVersion": "1.4.3", "boardSize": "9x10", "pieceTypes": { "K": { diff --git a/lib/src/constants.dart b/lib/src/constants.dart index 0f19798..2fa090d 100644 --- a/lib/src/constants.dart +++ b/lib/src/constants.dart @@ -12,7 +12,7 @@ typedef Hand = List; // TODO: there's a lot of stuff here now, maybe refactor and not call this constants? class Bishop { - static const version = '1.4.1'; + static const version = '1.4.3'; static const Colour white = 0; static const Colour black = 1; diff --git a/pubspec.yaml b/pubspec.yaml index 4b79632..cbe68ed 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,12 +1,11 @@ name: bishop -version: 1.4.2 +version: 1.4.3 description: Bishop is a chess logic package with flexible variant support. repository: https://github.com/alexobviously/bishop issue_tracker: https://github.com/alexobviously/bishop/issues environment: sdk: '>=3.2.0 <4.0.0' - dev_dependencies: benchmark_harness: ^2.0.0 collection: ^1.17.1