pipe-game

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 c3d37243ef292592e2e8fecbaee1824c16f8bcb9
parent e420cc68502a97c461933421f7fc24c01d65469a
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Sat, 25 Jan 2025 14:12:33 +0100

Ajout de la pile de l'adversaire

Elle commence abitrairement avec un strike pour le moment

Diffstat:
Minterface.c | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/interface.c b/interface.c @@ -18,7 +18,7 @@ typedef struct int curline; } pile; -enum pileid { HAND, PLAYED, ARGS, PLAYEDARGS }; +enum pileid { HAND, PLAYED, ARGS, PLAYEDARGS, PLAYEDENNEMY }; int max(int a, int b) { return a > b ? a : b; } @@ -198,6 +198,10 @@ int display(pile** piles, pile curmenu, bool selection, char* cmd, char* res, ch displaypile(*piles[PLAYEDARGS], curmenu, CARD_NAME_SIZE*2+2, 0, selection); + vr(CARD_NAME_SIZE*3,0,max(lineoffset,lo)); + + displaypile(*piles[PLAYEDENNEMY], curmenu, CARD_NAME_SIZE*3+2, 0, selection); + lineoffset=displaytextblock(res,0,lineoffset); lineoffset=displaytextblock(intern,0,lineoffset); lineoffset=displaytextblock(cmd,0,lineoffset); @@ -223,14 +227,18 @@ int main(int argc, char **argv) { char cmd[LIST_SIZE]; cmd[0]='\0'; - pile *piles[4]; + pile *piles[5]; pile hand=createpile("hand"); pile played=createpile("played"); pile args=createpile("args"); pile playedargs=createpile("playedargs"); + pile playedennemy=createpile("playedennemy"); piles[HAND]=&hand;piles[PLAYED]=&played; piles[ARGS]=&args;piles[PLAYEDARGS]=&playedargs; + piles[PLAYEDENNEMY]=&playedennemy; + file2pile(stdin, &hand, piles); + addcardtopile("strike",&playedennemy,piles); bool selection=false; bool quit=false;