X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=moves.h;h=b2fcec6a8916695ecb5f1007db2e7fc504d23d05;hp=d48b9f2fca6f1b50fa394a4faf767d69a2ee0e95;hb=d016fb202fe45795e630e22ba516e754cf694ea6;hpb=762e18baef5f815cc46019ba3e082bd5ec1980f6 diff --git a/moves.h b/moves.h index d48b9f2..b2fcec6 100644 --- a/moves.h +++ b/moves.h @@ -1,9 +1,13 @@ /* * moves.h - Move generation and checking - * $Id: moves.h,v 2.1 2003/10/27 19:21:00 mann Exp $ * - * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - * Enhancements Copyright 1992-95 Free Software Foundation, Inc. + * Copyright 1991 by Digital Equipment Corporation, Maynard, + * Massachusetts. + * + * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, + * 2007, 2008, 2009 Free Software Foundation, Inc. + * + * Enhancements Copyright 2005 Alessandro Scotti * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -27,24 +31,25 @@ * SOFTWARE. * ------------------------------------------------------------------------ * - * The following terms apply to the enhanced version of XBoard distributed - * by the Free Software Foundation: + * The following terms apply to the enhanced version of XBoard + * distributed by the Free Software Foundation: * ------------------------------------------------------------------------ - * This program is free software; you can redistribute it and/or modify + * + * GNU XBoard is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU XBoard is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * ------------------------------------------------------------------------ - */ + * along with this program. If not, see http://www.gnu.org/licenses/. * + * + *------------------------------------------------------------------------ + ** See the file ChangeLog for a revision history. */ extern ChessSquare PromoPiece P((ChessMove moveType)); extern ChessMove PromoCharToMoveType P((int whiteOnMove, int promoChar)); @@ -74,6 +79,7 @@ typedef void (*MoveCallback) P((Board board, int flags, ChessMove kind, and all non-pawns on adjacent squares; destroying your own king is illegal */ #define F_FRC_TYPE_CASTLING 256 /* generate castlings as captures of own Rook */ +#define F_MANDATORY_CAPTURE 0x200 /* Special epfile values. [HGM] positive values are non-reversible moves! */ #define EP_NONE (-4) /* [HGM] Tricky! order matters: */ @@ -84,6 +90,7 @@ typedef void (*MoveCallback) P((Board board, int flags, ChessMove kind, #define EP_RULE_DRAW (-14) #define EP_INSUF_DRAW (-13) #define EP_DRAWS (-10) +#define EP_WINS (-9) #define EP_BEROLIN_A 16 /* [HGM] berolina: add to file if pawn to be taken of a-side of e.p.file */ #define EP_CHECKMATE 100 /* [HGM] verify: record mates in epStatus for easy claim verification */ #define EP_STALEMATE -16 @@ -131,6 +138,12 @@ extern ChessMove LegalityTest P((Board board, int flags, int epfile, #define MT_CHECK 1 #define MT_CHECKMATE 2 #define MT_STALEMATE 3 +#define MT_STAINMATE 4 /* [HGM] xq: for games where being stalemated counts as a loss */ +#define MT_STEALMATE 5 /* [HGM] losers: for games where being stalemated counts as a win */ +#define MT_TRICKMATE 6 /* [HGM] losers: for games where being checkmated counts as a win */ +#define MT_BARE 7 /* [HGM] shatranj: for games where having bare king loses */ +#define MT_DRAW 8 /* [HGM] shatranj: other draws */ +#define MT_NOKING 9 /* [HGM] atomic: for games lost through king capture */ /* Return MT_NONE, MT_CHECK, MT_CHECKMATE, or MT_STALEMATE */ extern int MateTest P((Board board, int flags, int epfile,