--- a/src/main.c Mon Jun 02 19:32:37 2025 +0200 +++ b/src/main.c Mon Jun 02 19:40:24 2025 +0200 @@ -27,9 +27,11 @@ * */ -#include "terminal-chess.h" +#define PROGRAM_VERSION "0.9 beta" + #include "game.h" #include "input.h" +#include "network.h" #include "colors.h" #include <string.h> #include <time.h> @@ -160,46 +162,6 @@ return settings; } -void dump_gameinfo(GameInfo *gameinfo) { - int serverwhite = gameinfo->servercolor == WHITE; - attron(A_UNDERLINE); - printw("Game details\n"); - attroff(A_UNDERLINE); - printw(" Server: %s\n Client: %s\n", - serverwhite?"White":"Black", serverwhite?"Black":"White" - ); - if (gameinfo->timecontrol) { - if (gameinfo->time % 60) { - printw(" Time limit: %ds + %ds\n", - gameinfo->time, gameinfo->addtime); - } else { - printw(" Time limit: %dm + %ds\n", - gameinfo->time/60, gameinfo->addtime); - } - } else { - printw(" No time limit\n"); - } - refresh(); -} - -void dump_moveinfo(GameState *gamestate) { - int i = 1; - for (MoveList *movelist = gamestate->movelist ; - movelist ; movelist = movelist->next) { - if (++i % 2 == 0) { - printw("%d. %s", i/2, movelist->move.string); - } else { - printw(" %s", movelist->move.string); - } - if (i % 20) { - addch(' '); - } else { - addch('\n'); - } - } - refresh(); -} - int main(int argc, char **argv) { srand(time(NULL));