src/chess/pgn.c

changeset 133
c58ae152733e
parent 132
5762f2b5f87a
equal deleted inserted replaced
132:5762f2b5f87a 133:c58ae152733e
270 } else if (gamestate->wresign) { 270 } else if (gamestate->wresign) {
271 result = "0-1"; 271 result = "0-1";
272 } else if (gamestate->bresign) { 272 } else if (gamestate->bresign) {
273 result = "1-0"; 273 result = "1-0";
274 } else if (gamestate->checkmate) { 274 } else if (gamestate->checkmate) {
275 if (gamestate->movecount > 0) { 275 if (current_color(gamestate) == BLACK) {
276 result = (last_move(gamestate).piece & COLOR_MASK) == WHITE ? 276 result = "1-0";
277 "1-0" : "0-1";
278 } else { 277 } else {
279 result = "0-1"; 278 result = "0-1";
280 } 279 }
281 } else { 280 } else {
282 result = "*"; 281 result = "*";

mercurial