src/main.c

changeset 132
5762f2b5f87a
parent 131
c33567d61ba7
equal deleted inserted replaced
131:c33567d61ba7 132:5762f2b5f87a
29 29
30 #define PROGRAM_VERSION "1.0 alpha" 30 #define PROGRAM_VERSION "1.0 alpha"
31 31
32 #include "chess/rules.h" 32 #include "chess/rules.h"
33 #include "chess/pgn.h" 33 #include "chess/pgn.h"
34 #include "chess/fen.h"
34 #include "input.h" 35 #include "input.h"
35 #include "network.h" 36 #include "network.h"
36 #include "colors.h" 37 #include "colors.h"
37 #include <string.h> 38 #include <string.h>
38 #include <time.h> 39 #include <time.h>
277 return 0; 278 return 0;
278 } 279 }
279 280
280 static void draw_board(GameState *gamestate, uint8_t perspective) { 281 static void draw_board(GameState *gamestate, uint8_t perspective) {
281 char fen[90]; 282 char fen[90];
282 compute_fen(fen, gamestate); 283 fen_compute(fen, gamestate);
283 mvaddstr(0, 0, fen); 284 mvaddstr(0, 0, fen);
284 285
285 for (uint8_t y = 0 ; y < 8 ; y++) { 286 for (uint8_t y = 0 ; y < 8 ; y++) {
286 for (uint8_t x = 0 ; x < 8 ; x++) { 287 for (uint8_t x = 0 ; x < 8 ; x++) {
287 uint8_t col = gamestate->board[y][x] & COLOR_MASK; 288 uint8_t col = gamestate->board[y][x] & COLOR_MASK;

mercurial