File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -575,6 +575,14 @@ public function testIsInBasicDrawKingAndTwoKnightsVsKing()
575
575
$ this ->assertTrue ($ this ->game ->inBasicDraw ());
576
576
}
577
577
578
+ public function testIsNotInBasicDrawWith4pieces ()
579
+ {
580
+ $ startFen = '8/8/6B1/3k4/8/4K3/5Q2/8 w - - ' ;
581
+
582
+ $ this ->game ->resetGame ($ startFen );
583
+ $ this ->assertFalse ($ this ->game ->inBasicDraw ());
584
+ }
585
+
578
586
public function testIsInCheckmate ()
579
587
{
580
588
$ startFen = '3k2R1/8/3K4/8/8/8/8/8 b - - ' ;
Original file line number Diff line number Diff line change @@ -1453,6 +1453,8 @@ public function inBasicDraw()
1453
1453
&& in_array ($ playerWith3Pieces [2 ], array ('K ' , 'N ' ))) {
1454
1454
return true ; //KNN vs K
1455
1455
}
1456
+
1457
+ return false ;
1456
1458
}
1457
1459
1458
1460
$ playerWith2Pieces = count ($ whitePieces ) === 2 ? $ whitePieces : $ blackPieces ;
You can’t perform that action at this time.
0 commit comments