Specify license and include GPL text
[uci2wb.git] / UCI2WB.c
index a6c229f..9704071 100644 (file)
--- a/UCI2WB.c
+++ b/UCI2WB.c
@@ -1,4 +1,13 @@
-/************************* UCI2WB by H.G.Muller ****************************/\r
+/****************************************************************************/\r
+/*                           UCI2WB by H.G.Muller                           */\r
+/*                                                                          */\r
+/* UCI2WB is an adapter to run engines that communicate in various dialects */\r
+/* of the Universal Chess Interface in a GUI that supports XBoard protocol  */\r
+/* (CECP). It supports UCI (when used for Xiangqi: the 'Cyclone dialect'),  */\r
+/* as well as USI and UCCI when used with the flags -s or -x, respectively. */\r
+/* This version of UCI2WB is released under the GNU General Public License, */\r
+/* of which you should have received a copy together with this file.        */\r
+/****************************************************************************/\r
 \r
 #define VERSION "2.0"\r
 \r
@@ -120,7 +129,7 @@ Play(int nr)
        FromFEN(iniPos + 4); // in XQ iniPos always has just "fen " prefix\r
        for(i=0; i<nr; i++) {\r
            int from=Sqr(move[i], 0), to=Sqr(move[i], 2);\r
-           if(board[to]) last = i;\r
+           if(board[to] || (board[from]|32)  == 'p' && move[i][1] != move[i][3]) last = i;\r
            board[to] = board[from]; board[from] = 0;\r
        }\r
        return last;\r