1 /* DreamChess 2 ** 3 ** DreamChess is the legal property of its developers, whose names are too 4 ** numerous to list here. Please refer to the AUTHORS.txt file distributed 5 ** with this source distribution. 6 ** 7 ** This program is free software: you can redistribute it and/or modify 8 ** it under the terms of the GNU General Public License as published by 9 ** the Free Software Foundation, either version 3 of the License, or 10 ** (at your option) any later version. 11 ** 12 ** This program is distributed in the hope that it will be useful, 13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 ** GNU General Public License for more details. 16 ** 17 ** You should have received a copy of the GNU General Public License 18 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef COMMON_SAN_H 22 #define COMMON_SAN_H 23 24 #define SAN_PAWN 0 25 #define SAN_KNIGHT 1 26 #define SAN_BISHOP 2 27 #define SAN_ROOK 3 28 #define SAN_QUEEN 4 29 #define SAN_KING 5 30 31 #define SAN_NORMAL 0 32 #define SAN_CAPTURE 1 33 #define SAN_QUEENSIDE_CASTLE 2 34 #define SAN_KINGSIDE_CASTLE 3 35 36 #define SAN_STATE_NORMAL 0 37 #define SAN_STATE_CHECK 1 38 #define SAN_STATE_CHECKMATE 2 39 40 #define SAN_NOT_SPECIFIED -1 41 42 typedef struct san_move 43 { 44 int type; 45 int state; 46 int piece; 47 int source_file, source_rank; 48 int destination; 49 int promotion_piece; 50 } san_move_t; 51 52 san_move_t *san_parse(char *s); 53 char *san_string(san_move_t *move); 54 55 #endif 56