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 4dae937e97cec1782dbbc9f9004c772d290b1b42
parent d0374e159379596b60322464fe646b324feef2f6
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Tue, 21 Jan 2025 21:30:51 +0100

Ajout fonction pour un hr vertical (vr)

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

diff --git a/interface.c b/interface.c @@ -34,6 +34,12 @@ void hr(int rowoffset, int lineoffset, int length) { tb_printf(rowoffset, lineoffset, TB_DEFAULT, TB_BLACK, ruler); } +void vr(int rowoffset, int lineoffset, int length) { + for (int i=0;i<length;i++) { + tb_printf(rowoffset,lineoffset+i,TB_DEFAULT, TB_DEFAULT, "|"); + } +} + pile createpile(char *name) { pile p; p.cards=malloc(LIST_SIZE); @@ -141,9 +147,7 @@ void display(pile** piles, pile curmenu, bool selection, char* cmd, char* res, c lineoffset=displaypile(*piles[ARGS], curmenu, lineoffset, 0, selection); displaypile(*piles[PLAYED], curmenu, 0, CARD_NAME_SIZE+2, selection); - for (int i=0;i<lineoffset;i++) { - tb_printf(CARD_NAME_SIZE,i,TB_DEFAULT, TB_BLACK, "|"); - } + vr(CARD_NAME_SIZE,0,lineoffset); tb_printf(0, lineoffset+1+piles[ARGS]->cardCount, TB_DEFAULT, TB_BLACK, cmd); hr(0,lineoffset,5);