From b445cde38b6743bddfcf7bf8d7df3d19f0ebf714 Mon Sep 17 00:00:00 2001 From: "remi.greub" <remi.greub@hes-so.ch> Date: Mon, 31 Mar 2025 00:46:37 +0200 Subject: [PATCH] =?UTF-8?q?warining=20de=20la=20variable=20win=20pas=20uti?= =?UTF-8?q?lis=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- puissance4_GRB/main.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/puissance4_GRB/main.c b/puissance4_GRB/main.c index ba26748..38598c5 100644 --- a/puissance4_GRB/main.c +++ b/puissance4_GRB/main.c @@ -18,27 +18,25 @@ int main(int argc, char** argv){ }else{ width = atoi(argv[3]); } - int win = 0; + printf("Board size is %dx%d (rows x col)\n",height,width); init_puissance4(height, width); switch (mode) { - case 1: + case 1: + Launch_puissance4_randBot(0); + break; + case 2: + Launch_puissance4_smartBot(0); + break; + case 3: + Launch_puissance4(); + break; - win = Launch_puissance4_randBot(0); - break; - case 2: - win = Launch_puissance4_smartBot(0); - break; - case 3: - win = Launch_puissance4(); - break; - - default: - printf("t'as pas rentré un mode valide ! c'est 1, 2 ou 3\n"); - return EXIT_FAILURE; - + default: + printf("t'as pas rentré un mode valide ! c'est 1, 2 ou 3\n"); + return EXIT_FAILURE; } return EXIT_SUCCESS; -- GitLab