This commit is contained in:
Gnieark 2016-06-13 19:37:52 +02:00
parent 98dd6280e6
commit fd95227e8b

View File

@ -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;