Un jeu de cartes à piper les une dans les autres - retour accueil
git clone git://bebou.netlib.re/pipe-game
Log | Files | Refs | README |
commit 7312fe7716f3dd871a655ce2821d672ffad021ae parent 7b550196cf82c2c8e5ce4dd1db8c134943175cdc Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Mon, 20 Jan 2025 17:15:36 +0100 Plus de place pour les noms des cartes Diffstat:
M | interface.c | | | 10 | ++++------ |
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/interface.c b/interface.c @@ -7,7 +7,7 @@ #define LIST_SIZE 1000 /* Le chiffre c'est des octets. Les caractères sont encodés sur un octet chacun ? * Donc si on met 5 la taille max serait 4 caractères ? */ -#define CARD_NAME_SIZE 20 +#define CARD_NAME_SIZE 25 struct pile { @@ -125,14 +125,12 @@ int main(int argc, char **argv) { char cmd[2000]; cmd[0]='\0'; - struct pile hand = file2pile(fp); - struct pile *h = &hand; - struct pile played; - struct pile *p=&played; + struct pile hand=file2pile(fp); struct pile *h=&hand; + hand.curline=0; + struct pile played; struct pile *p=&played; played.cards=malloc(LIST_SIZE); played.cardCount=0; played.curline=0; - hand.curline=0; tb_init(); bool selection=false;