From 75b07840c0fd4dfdd6af6b352b3c4b461d651130 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Tue, 17 Feb 2015 11:34:34 +0100 Subject: [PATCH] =?UTF-8?q?TP3A=20choisir=5Ftir=5F3=20corrig=C3=A9=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No comment --- S2/TP3/bataille_navale_ia.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/S2/TP3/bataille_navale_ia.py b/S2/TP3/bataille_navale_ia.py index 0c693fd..265e706 100644 --- a/S2/TP3/bataille_navale_ia.py +++ b/S2/TP3/bataille_navale_ia.py @@ -106,8 +106,8 @@ def choisir_tir_3(jeu, res): jeu['ia']['mode'] = 0 else: # Si en mode aléatoire while 1: - x = randint(0, jeu['plateau']['larg']) - y = randint(0, jeu['plateau']['larg']) + x = randint(1, jeu['plateau']['larg']) + y = randint(1, jeu['plateau']['larg']) coup = (x, y) if coup not in jeu['coups_joues']: break