From 04eaadb9bdf39b98bac01559b5b3c83ed1e7056a Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 13 Jun 2016 21:52:45 +0200 Subject: [PATCH] . --- connectfour.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/connectfour.php b/connectfour.php index 51cfcbb..1ec7bc1 100644 --- a/connectfour.php +++ b/connectfour.php @@ -90,12 +90,17 @@ function score($board,$me,$opponent,$colToPlay,$depth){ } if($depth < 7){ - return $depth - better_col($newBoard,$opponent,$me,$depth + 1); + //CO + return 0 - better_col($newBoard,$opponent,$me,$depth + 1); }else{ return 0; } } +function worst_col($board,$me,$opponent,$depth){ + + +} function better_col($board,$me,$opponent,$depth){ $betterScore= -1000; $betterCol= -1;