src/chess/game-info.h

changeset 126
d58b2abdd330
parent 122
e65d9b5e9324
equal deleted inserted replaced
125:e195652038e0 126:d58b2abdd330
98 /** a premove that shall be evaluated next time it's our turn */ 98 /** a premove that shall be evaluated next time it's our turn */
99 char premove[8]; 99 char premove[8];
100 bool checkmate; 100 bool checkmate;
101 bool stalemate; 101 bool stalemate;
102 bool remis; 102 bool remis;
103 bool resign; 103 bool wresign;
104 bool bresign;
104 /** this flag is only supposed to be set when the opponent disconnects */ 105 /** this flag is only supposed to be set when the opponent disconnects */
105 bool ragequit; 106 bool ragequit;
106 bool review; 107 bool review;
107 } GameState; 108 } GameState;
108 109
109 110
110 #define is_game_running(gamestate) !((gamestate)->checkmate || \ 111 #define is_game_running(gamestate) !((gamestate)->checkmate || \
111 (gamestate)->resign || (gamestate)->stalemate || (gamestate)->remis || \ 112 (gamestate)->wresign || (gamestate)->bresign || \
112 (gamestate)->review) 113 (gamestate)->stalemate || (gamestate)->remis || (gamestate)->review)
113 114
114 #define last_move(gamestate) \ 115 #define last_move(gamestate) \
115 ((gamestate)->moves[(gamestate)->movecount-1]) 116 ((gamestate)->moves[(gamestate)->movecount-1])
116 117
117 /** 118 /**

mercurial