pagination
This commit is contained in:
parent
cd595e8784
commit
98dd6280e6
|
@ -89,7 +89,7 @@ function score($board,$me,$opponent,$colToPlay,$depth){
|
||||||
}
|
}
|
||||||
|
|
||||||
if($depth < 5){
|
if($depth < 5){
|
||||||
return 0 - better_col($newBoard,$opponent,$me,$depth + 1);
|
return 0 - better_col($newBoard,$opponent,$me,$depth + 1) + $depth;
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -135,7 +135,7 @@ switch($params['action']){
|
||||||
$opponent="X";
|
$opponent="X";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '{"play":"'.better_col($params['board'],$params['you'],$opponent,0).'"}';
|
echo '{"play":"'.better_col($params['board'],$params['you'],$opponent,1).'"}';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user