From fd95227e8b355bcc6af5e2e234d6208ade1c051e Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 13 Jun 2016 19:37:52 +0200 Subject: [PATCH] . --- connectfour.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectfour.php b/connectfour.php index 9f58cf4..bd17458 100644 --- a/connectfour.php +++ b/connectfour.php @@ -79,7 +79,7 @@ function score($board,$me,$opponent,$colToPlay,$depth){ //if grid is full $full = true; for($i = 0; $i < 7; $i++){ - if($newBoard == " "){ + if($newBoard == "+"){ $full = false; break; } @@ -89,7 +89,7 @@ function score($board,$me,$opponent,$colToPlay,$depth){ } if($depth < 5){ - return 0 - better_col($newBoard,$opponent,$me,$depth + 1) + $depth; + return 0 - better_col($newBoard,$opponent,$me,$depth + 1); }else{ return 0;