From 66e98f76fbeb9c12611d2751e3885096f144b3f3 Mon Sep 17 00:00:00 2001 From: "remi.greub" <remi.greub@hes-so.ch> Date: Thu, 27 Mar 2025 01:22:39 +0100 Subject: [PATCH] =?UTF-8?q?gestion=20entr=C3=A9es=20de=20chiffres=20de=201?= =?UTF-8?q?=20=C3=A0=20n=20et=20non=200=20=C3=A0=20n-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- puissance4_GRB/puissance4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/puissance4_GRB/puissance4.c b/puissance4_GRB/puissance4.c index aea2c00..d3bce76 100644 --- a/puissance4_GRB/puissance4.c +++ b/puissance4_GRB/puissance4.c @@ -109,9 +109,10 @@ int Launch_puissance4(){ //print_gameCells(); print_game(); printf("au tour de %d de jouer\n", game.curr_player); - printf("balance un chiffre entre 0 et %d\n", game.width-1); + printf("balance un chiffre entre 1 et %d\n", game.width); do{ scanf("%d",&chiffre); + chiffre-=1; //gestion des chiffres de 1 à n et non de 0 à n-1 if(chiffre >= game.width || chiffre < 0){ printf("HEP HEPHEP !! donne un chiffre dans la plage donnee manche a couille\n"); } -- GitLab