| 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 resign; |
| |
104 /** this flag is only supposed to be set when the opponent disconnects */ |
| |
105 bool ragequit; |
| |
106 bool review; |
| 104 } GameState; |
107 } GameState; |
| 105 |
108 |
| 106 |
109 |
| 107 #define is_game_running(gamestate) !((gamestate)->checkmate || \ |
110 #define is_game_running(gamestate) !((gamestate)->checkmate || \ |
| 108 (gamestate)->resign || (gamestate)->stalemate || (gamestate)->remis) |
111 (gamestate)->resign || (gamestate)->stalemate || (gamestate)->remis || \ |
| |
112 (gamestate)->review) |
| 109 |
113 |
| 110 #define last_move(gamestate) \ |
114 #define last_move(gamestate) \ |
| 111 ((gamestate)->moves[(gamestate)->movecount-1]) |
115 ((gamestate)->moves[(gamestate)->movecount-1]) |
| 112 |
116 |
| 113 /** |
117 /** |