This commit is contained in:
Gnieark 2016-06-13 21:52:45 +02:00
parent 4f6c0f8786
commit 04eaadb9bd

View File

@ -90,12 +90,17 @@ function score($board,$me,$opponent,$colToPlay,$depth){
} }
if($depth < 7){ if($depth < 7){
return $depth - better_col($newBoard,$opponent,$me,$depth + 1); //CO
return 0 - better_col($newBoard,$opponent,$me,$depth + 1);
}else{ }else{
return 0; return 0;
} }
} }
function worst_col($board,$me,$opponent,$depth){
}
function better_col($board,$me,$opponent,$depth){ function better_col($board,$me,$opponent,$depth){
$betterScore= -1000; $betterScore= -1000;
$betterCol= -1; $betterCol= -1;