le jeu des motos dans tron - retour accueil
git clone git://bebou.netlib.re/tron
Log | Files | Refs | README |
commit f0560e60998022f82aead9d0c2cddda8d8954e5a parent db653918290cd61c3c0834d7ac7cf632e844a75e Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Thu, 26 Jun 2025 15:21:30 +0200 On préfère le cyan et le magenta Diffstat:
M | tron.c | | | 5 | ++--- |
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tron.c b/tron.c @@ -54,7 +54,6 @@ void display(struct bikes bikes, int ticks, int tail, struct arena arena, int ti tb_print(0,i,0,0,"│"); tb_print(arena.width,i,0,0,"│"); } - } void update(struct bike *bike, coord *incs) { @@ -146,7 +145,7 @@ int main(int argc, char **argv) { struct bikes bikes; bikes.count=0; bikes.list=malloc(MAX_CAR_NUMBER*sizeof(struct bike)); for(int i=0;i<NB_DEFAULT_PLAYERS;i++) - createbike(2+bikes.count%8, &bikes, arena); + createbike(bikes.count%8+6, &bikes, arena); int timeout=80; @@ -165,7 +164,7 @@ int main(int argc, char **argv) { switch(ev.ch) { case 43: /*+*/ if (bikes.count<MAX_CAR_NUMBER) { - createbike(bikes.count%8+2,&bikes,arena); + createbike(bikes.count%8+6,&bikes,arena); update(&bikes.list[bikes.count-1],incs); } else for (int i=0;i<bikes.count;i++)