Skip to content

Commit

Permalink
Version 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexobviously committed Feb 4, 2024
1 parent 0f00fe5 commit 4c1ef4d
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### 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` 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).
Expand Down
4 changes: 2 additions & 2 deletions example/json/seirawan.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Seirawan Chess",
"description": "",
"bishopVersion": "1.3.0",
"bishopVersion": "1.4.1",
"boardSize": "8x8",
"pieceTypes": {
"P": {
Expand Down Expand Up @@ -42,7 +42,7 @@
"promotionOptions": "bishop.promo.standard",
"materialConditions": {
"enabled": true,
"soloMaters": ["P", "Q", "R", "A", "C"],
"soloMaters": ["P", "Q", "R", "E", "H"],
"pairMaters": ["N"],
"combinedPairMaters": ["B"],
"specialCases": [["B", "N"]]
Expand Down
2 changes: 1 addition & 1 deletion lib/src/actions/actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Action {
action: action,
precondition: Conditions.merge([
Conditions.movingPieceType(type),
if (precondition != null) precondition!
if (precondition != null) precondition!,
]),
condition: condition,
);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/actions/actions/checks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ActionCheckRoyalsAlive extends Action {
: [
EffectSetGameResult(
WonGameRoyalDead(winner: Bishop.white),
)
),
];
}
return kingsAlive[Bishop.black]
Expand Down
4 changes: 2 additions & 2 deletions lib/src/actions/definitions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ActionDefinitions {
: trigger.piece.colour,
trigger.variant.pieceIndexLookup[type]!,
),
)
),
];

/// An action that removes a piece of [type] from the moving player's hand.
Expand All @@ -73,7 +73,7 @@ class ActionDefinitions {
: trigger.piece.colour,
trigger.variant.pieceIndexLookup[type]!,
),
)
),
];

/// Simply output the effects regardless of the trigger.
Expand Down
4 changes: 2 additions & 2 deletions lib/src/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ typedef Hand = List<int>;

// TODO: there's a lot of stuff here now, maybe refactor and not call this constants?
class Bishop {
static const version = '1.4.0';
static const version = '1.4.1';

static const Colour white = 0;
static const Colour black = 1;
Expand Down Expand Up @@ -100,7 +100,7 @@ class Bishop {
'q': '♕',
'k': '♔',
'p': '♙',
'.': '·'
'.': '·',
};

/// Gets the file for [square], according to [size].
Expand Down
7 changes: 3 additions & 4 deletions lib/src/variant/options/material_conditions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ class MaterialConditions<T> {
static const standard = MaterialConditions(
enabled: true,
soloMaters: ['P', 'Q', 'R', 'A', 'C'],
pairMaters: [
'N'
], // although a knight cannot force mate, it can happen if the opponent helps
// although a knight cannot force mate, it can happen if the opponent helps
pairMaters: ['N'],
combinedPairMaters: ['B'],
specialCases: [
['B', 'N']
['B', 'N'],
],
);

Expand Down
2 changes: 1 addition & 1 deletion lib/src/variant/variants/large.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ abstract class LargeVariants {
'A': PieceType.archbishop(),
'M': PieceType.chancellor(), // Marshall
'C': PieceType.fromBetza('DAW', value: 400), // Champion
'W': PieceType.fromBetza('CF', value: 400) // Wizard
'W': PieceType.fromBetza('CF', value: 400), // Wizard
},
);
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: bishop
version: 1.4.0
version: 1.4.1
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
Expand Down
2 changes: 1 addition & 1 deletion test/crazyhouse_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void main() {
'e5d4',
'd1f3',
'g8f6',
'c1g5'
'c1g5',
];
for (String m in moves) {
bool ok = g.makeMoveString(m);
Expand Down

0 comments on commit 4c1ef4d

Please sign in to comment.