le jeu des motos dans tron - retour accueil
git clone git://bebou.netlib.re/tron
Log | Files | Refs | README |
commit 756f98289e0f4d2945eb8c81cc0d9b3fe4893489 parent 9c7f8d27a55035aaa88803c0704f4cfbadb910bc Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Thu, 26 Jun 2025 21:13:17 +0200 Uniformisation des touches Diffstat:
M | tron.c | | | 10 | +++++----- |
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tron.c b/tron.c @@ -47,7 +47,7 @@ void display_title_screen(int height, int width) { ██ ██ ██ ██████ ██ ████"); tb_printf(width/2-35/2-5,height/2-5/2+5+2,0,0,"\ -Entrée pour continuer\n\ +Espace pour continuer ou mettre en pause\n\ Echap pour quitter\n\ \n\ + pour ajouter une vélo\n\ @@ -55,9 +55,7 @@ Echap pour quitter\n\ \n\ Vélo 1 ↑←↓→\n\ Vélo 2 zqsd\n\ -Vélo 3 ijkl\n\ -\n\ -espace pour mettre en pause ou en sortir"); +Vélo 3 ijkl\n"); } @@ -158,7 +156,7 @@ int main(int argc, char **argv) { if(bikes.list[i].status==ALIVE) update(&bikes.list[i],incs); - while(ev.key!=13) { + while(ev.key!=32) { tb_clear(); display_title_screen(height, width); display(bikes,ticknb,arena,timeout); @@ -199,6 +197,8 @@ int main(int argc, char **argv) { if(ticknb%10==0 && timeout>30) timeout--; switch(ev.ch) { case 32: /*space*/ + display_title_screen(height,width); + tb_present(); do tb_poll_event(&ev); while(ev.ch!=32); break;