/* * external.h -- en-tête réduit remplaçant celui de GNU Backgammon. * * Copyright (C) 2026 les auteurs d'Ustagammon. * Les deux structures ci-dessous sont reprises telles quelles de external.h * de GNU Backgammon (commit 14b6798, Copyright (C) 2001-2025 the AUTHORS). * Licence : GPLv3 ou ultérieure (voir LICENSE). * * drawboard.c (repris pour FormatMove, la notation des coups) inclut * external.h pour ces deux types, utilisés par ProcessFIBSBoardInfo. Le * reste de l'interface externe de gnubg (sockets) n'a pas lieu d'être ici. */ #ifndef EXTERNAL_H #define EXTERNAL_H #include #include "backgammon.h" #define MAX_NAME_LEN 32 typedef struct { /* * These must be in the same order than the FIBS board string definition, * starting at Match Length. * See description at http://www.fibs.com/fibs_interface.html#board_state */ int nMatchTo; int nScore; int nScoreOpp; int anFIBSBoard[26]; int nTurn; int anDice[2]; int anOppDice[2]; int nCube; int fCanDouble; int fOppCanDouble; int fDoubled; int nColor; int nDirection; int nHome; /* unused, set to 0 */ int nBar; /* unused, set to 25 */ int nOnHome; /* unused */ int nOnHomeOpp; /* unused */ int nOnBar; /* unused */ int nOnBarOpp; /* unused */ int nCanMove; /* unused */ int fForcedMOve; /* unused */ int fPostCrawford; /* * Redoubles from FIBS board is not usable by GNUbg. * A flag for match play is put at the same place */ int fNonCrawford; int nVersion; int padding[51]; /* These must be last */ GString *gsName; GString *gsOpp; } FIBSBoardInfo; typedef struct { char szPlayer[MAX_NAME_LEN]; char szOpp[MAX_NAME_LEN]; int nMatchTo; int nScore; int nScoreOpp; int anDice[2]; int nCube; int fCubeOwner; int fDoubled; int fCrawford; int fJacoby; int nResignation; TanBoard anBoard; } ProcessedFIBSBoard; #endif