Skip to content

Commit 38b0d7e

Browse files
committed
Extend insufficient material tests
1 parent d95dcfe commit 38b0d7e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/apiutil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ inline bool has_insufficient_material(Color c, const Position& pos) {
388388
}
389389

390390
// Mating pieces
391-
for (PieceType pt : { ROOK, QUEEN, ARCHBISHOP, CHANCELLOR, SILVER, GOLD, COMMONER, CENTAUR })
391+
for (PieceType pt : { ROOK, QUEEN, ARCHBISHOP, CHANCELLOR, SILVER, GOLD, COMMONER, CENTAUR, AMAZON, BERS })
392392
if ((pos.pieces(c, pt) & ~restricted) || (pos.count(c, pos.promotion_pawn_type(c)) && (pos.promotion_piece_types(c) & pt)))
393393
return false;
394394

test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@
174174
"newzealand": {
175175
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1": (False, False), # startpos
176176
},
177+
"amazon": {
178+
"rnbakbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBAKBNR w KQkq - 0 1": (False, False), # startpos
179+
"8/8/8/8/A7/6k1/8/1K6 w - - 0 1": (False, True), # KA vs K
180+
},
177181
"seirawan": {
178182
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR[HEhe] w KQBCDFGkqbcdfg - 0 1": (False, False), # startpos
179183
"k7/8/8/8/8/8/8/K7[] w - - 0 1": (True, True), # K vs K

0 commit comments

Comments
 (0)