diff --git a/puissance4_GRB/puissance4.c b/puissance4_GRB/puissance4.c index 6354c87e8aef99f6cea21af36e086aff56e51181..58bc30fcd213a2fe0a8161a88219282c120ce7a9 100644 --- a/puissance4_GRB/puissance4.c +++ b/puissance4_GRB/puissance4.c @@ -362,6 +362,7 @@ int SmartBot(){ //verifie que le coup est jouable if((pos = put_free_cell(chfr, game.players[game.curr_player].symbol))>=0){ struct cell *tempCell = &game.cells[chfr][pos]; + tempCell->symbol = game.players[game.curr_player].symbol; if (Find_winner(game.cells, game.cells[chfr][pos]) == game.players[game.curr_player].symbol){ //1er cas : a trouvé le bon coup à jouer pour gagner tempCell->symbol = EMPTY; @@ -374,6 +375,7 @@ int SmartBot(){ tempCell->symbol = EMPTY; return chfr; } + tempCell->symbol = EMPTY; } } //3e cas : joue un coup au hasard