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 295b7fd768bd61debdccd19dd0e0834d8e2ea9ab
parent bb5d46c76a86e09be29fe66e2f265cd41c3d0f24
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Tue, 21 Jan 2025 12:16:33 +0100

Plus besoin de curline en arg de display

C'est dans h et p

Diffstat:
Minterface.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/interface.c b/interface.c @@ -104,12 +104,12 @@ pile file2pile(FILE *fp) { } -void display(pile* h, pile* p, int handcurline, int playedcurline, char* curmenu,bool selection, char* cmd, char* res, char* intern) { +void display(pile* h, pile* p, char* curmenu, bool selection, char* cmd, char* res, char* intern) { tb_clear(); int i; int j; int w; int biggestpile=max(p->cardCount,h->cardCount); for (i=0;i<h->cardCount;i++) { - if (i==handcurline && curmenu=="hand") { + if (i==h->curline && curmenu=="hand") { if (selection) { tb_printf(0, i, TB_BLACK, TB_BLUE, h->cards[i]); } else { @@ -122,7 +122,7 @@ void display(pile* h, pile* p, int handcurline, int playedcurline, char* curmenu tb_printf(CARD_NAME_SIZE,w,TB_DEFAULT, TB_BLACK, "|"); } for (j=0;j<p->cardCount;j++) { - if (j==playedcurline && curmenu=="played") { + if (j==p->curline && curmenu=="played") { if (selection) { tb_printf(CARD_NAME_SIZE+2, j, TB_BLACK, TB_BLUE, p->cards[j]); } else { @@ -170,7 +170,7 @@ int main(int argc, char **argv) { updatecmd(cmd, played); updateres(res, cmd, fp2); updateinterncmd(intern, played); - display(&hand,&played,hand.curline,played.curline,curmenu,selection,cmd,res,intern); + display(&hand,&played,curmenu,selection,cmd,res,intern); tb_poll_event(&ev); switch(ev.key) { /* up */