From 48d5ff12f5ade9b72060bc3791600e235afee761 Mon Sep 17 00:00:00 2001 From: Rnhmjoj Date: Wed, 20 Feb 2013 12:35:33 +0100 Subject: [PATCH] Bugfix della funzione minimax --- tris.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tris.c b/tris.c index 8471892..6c29f1c 100755 --- a/tris.c +++ b/tris.c @@ -204,7 +204,7 @@ int minimax(int giocatore, int profondita){ else res-=2; } - else if((tmp=minimax(2,profondita-1))res) + else if(((tmp=minimax(1,profondita-1))>res)||(tmp==INT_MAX)) res=tmp; tabella[i][k]=0; }