src/chess/fen.c

changeset 134
ce2d285d2ccb
parent 133
c58ae152733e
equal deleted inserted replaced
133:c58ae152733e 134:ce2d285d2ccb
146 146
147 return sprintf(str, "%u", hm); 147 return sprintf(str, "%u", hm);
148 } 148 }
149 149
150 static size_t fen_movenr(char *str, GameState *gamestate) { 150 static size_t fen_movenr(char *str, GameState *gamestate) {
151 return sprintf(str, "%u", gamestate->movecount); 151 return sprintf(str, "%u", 1 + gamestate->movecount / 2);
152 } 152 }
153 153
154 static size_t fen_space(char *str) { 154 static size_t fen_space(char *str) {
155 *str = ' '; 155 *str = ' ';
156 return 1; 156 return 1;

mercurial