le jeu des motos dans tron - retour accueil
git clone git://bebou.netlib.re/tron
Log | Files | Refs | README |
commit db653918290cd61c3c0834d7ac7cf632e844a75e parent 28daec387a12bf6cd28ce4cca5923b8617092d4f Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Thu, 26 Jun 2025 15:18:46 +0200 Meilleur nommage de la const du nb de j par def Diffstat:
M | tron.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tron.c b/tron.c @@ -4,7 +4,7 @@ #define TAIL 100 #define MAX_CAR_NUMBER 3 -#define NB_PLAYERS 2 +#define NB_DEFAULT_PLAYERS 2 enum direction { UP, RIGHT, DOWN, LEFT }; enum status { DEAD, ALIVE }; @@ -145,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_PLAYERS;i++) + for(int i=0;i<NB_DEFAULT_PLAYERS;i++) createbike(2+bikes.count%8, &bikes, arena); int timeout=80;