This commit is contained in:
Gnieark 2016-06-15 13:37:15 +02:00
parent 95924b1d51
commit 6d1d652156

View File

@ -145,11 +145,11 @@ switch($params['action']){
$diagStr.=$params['board'][$y][$x];
}
if(can_win($diagStr,$params['you']) !== false){
echo '{"play":'.$x.'}';
echo '{"play":'.($k + can_win($diagStr,$params['you'])).'}';
die;
}
if (can_loose($diagStr,$opponent) !== false){
$colForNoLose = $x;
$colForNoLose = $k + can_loose($diagStr,$opponent);
}
//diagonale \
@ -158,11 +158,11 @@ switch($params['action']){
$diagStr.=$params['board'][$y][$x];
}
if(can_win($diagStr,$params['you']) !== false){
echo '{"play":'.$x.'}';
echo '{"play":'.($k + can_win($diagStr,$params['you'])).'}';
die;
}
if (can_loose($diagStr,$opponent) !== false){
$colForNoLose = $x;
$colForNoLose = ($k + can_loose($diagStr,$opponent));
}