From 98dd6280e61251cb1cff78b086ab946090b6b9e9 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 13 Jun 2016 19:35:05 +0200 Subject: [PATCH] pagination --- connectfour.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectfour.php b/connectfour.php index b907b30..9f58cf4 100644 --- a/connectfour.php +++ b/connectfour.php @@ -89,7 +89,7 @@ function score($board,$me,$opponent,$colToPlay,$depth){ } if($depth < 5){ - return 0 - better_col($newBoard,$opponent,$me,$depth + 1); + return 0 - better_col($newBoard,$opponent,$me,$depth + 1) + $depth; }else{ return 0; @@ -135,7 +135,7 @@ switch($params['action']){ $opponent="X"; } - echo '{"play":"'.better_col($params['board'],$params['you'],$opponent,0).'"}'; + echo '{"play":"'.better_col($params['board'],$params['you'],$opponent,1).'"}'; break; default: break;