}\r
K=I;\r
cnt = D(s,-I,I,Q,O,LL|4*S,3);\r
+#ifdef SHATRANJ\r
+ if(pl[s]==1 && pl[16-s]==1) {\r
+ printf("1/2-1/2 {Insufficient mating material}\n");\r
+ return 4;\r
+ }\r
+ if(pl[s]<=1 && pl[16-s]>1) {\r
+ if (s == BLACK)\r
+ printf("0-1 {Bare King}\n");\r
+ else\r
+ printf("1-0 {Bare King}\n");\r
+ return 5;\r
+ }\r
+ if(cnt>-I+1 && K==0 && L==0) {\r
+ if (s == WHITE)\r
+ printf("0-1 {Stalemate}\n");\r
+ else\r
+ printf("1-0 {Stalemate}\n");\r
+ return 2;\r
+ }\r
+#else\r
if(cnt>-I+1 && K==0 && L==0) {\r
printf("1/2-1/2 {Stalemate}\n");\r
return 2;\r
}\r
+#endif\r
if(cnt==-I+1) {\r
if (s == WHITE)\r
printf("0-1 {Black mates}\n");\r
printf("1/2-1/2 {Draw by fifty move rule}\n");\r
return 4;\r
}\r
-#ifdef SHATRANJ\r
- if(pl[s]==1 && pl[16-s]==1) {\r
- printf("1/2-1/2 {Insufficient mating material}\n");\r
- return 4;\r
- }\r
- if(pl[s]<=1 && pl[16-s]>1) {\r
- if (s == BLACK)\r
- printf("0-1 {Bare King}\n");\r
- else\r
- printf("1-0 {Bare King}\n");\r
- return 5;\r
- }\r
-#endif\r
return 0;\r
}\r
\r