X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fbitbase.cpp;h=ceb94a0f9ef002f7c5bcc6218c8bf5a09df47b7a;hb=0ecc920a09f479cb9b568716597e0756da557174;hp=b01a03d4bc8815ea3c20794057dfc1b3cde159c5;hpb=a94fd3bbec12722ca5aa09324260ca03d99e54cf;p=stockfish diff --git a/src/bitbase.cpp b/src/bitbase.cpp index b01a03d4..ceb94a0f 100644 --- a/src/bitbase.cpp +++ b/src/bitbase.cpp @@ -156,7 +156,7 @@ namespace { && rank_of(psq) < RANK_7) return DRAW; - // Case 4: White king in front of pawn and black has opposition + // Case 4: White king in front of pawn and black has opposition if ( stm == WHITE && wksq == psq + DELTA_N && bksq == wksq + DELTA_N + DELTA_N @@ -168,6 +168,13 @@ namespace { && file_of(psq) == FILE_A) return DRAW; + // Case 6: White king trapped on the rook file + if ( file_of(wksq) == FILE_A + && file_of(psq) == FILE_A + && rank_of(wksq) > rank_of(psq) + && bksq == wksq + 2) + return DRAW; + return UNKNOWN; }