.
This commit is contained in:
parent
95924b1d51
commit
6d1d652156
|
@ -145,11 +145,11 @@ switch($params['action']){
|
||||||
$diagStr.=$params['board'][$y][$x];
|
$diagStr.=$params['board'][$y][$x];
|
||||||
}
|
}
|
||||||
if(can_win($diagStr,$params['you']) !== false){
|
if(can_win($diagStr,$params['you']) !== false){
|
||||||
echo '{"play":'.$x.'}';
|
echo '{"play":'.($k + can_win($diagStr,$params['you'])).'}';
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
if (can_loose($diagStr,$opponent) !== false){
|
if (can_loose($diagStr,$opponent) !== false){
|
||||||
$colForNoLose = $x;
|
$colForNoLose = $k + can_loose($diagStr,$opponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
//diagonale \
|
//diagonale \
|
||||||
|
@ -158,11 +158,11 @@ switch($params['action']){
|
||||||
$diagStr.=$params['board'][$y][$x];
|
$diagStr.=$params['board'][$y][$x];
|
||||||
}
|
}
|
||||||
if(can_win($diagStr,$params['you']) !== false){
|
if(can_win($diagStr,$params['you']) !== false){
|
||||||
echo '{"play":'.$x.'}';
|
echo '{"play":'.($k + can_win($diagStr,$params['you'])).'}';
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
if (can_loose($diagStr,$opponent) !== false){
|
if (can_loose($diagStr,$opponent) !== false){
|
||||||
$colForNoLose = $x;
|
$colForNoLose = ($k + can_loose($diagStr,$opponent));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user