This commit is contained in:
Gnieark 2016-07-04 08:00:30 +02:00
parent 46600504cd
commit 5228bfdfa5

View File

@ -30,16 +30,16 @@ switch($params['action']){
list($x,$y) = explode(",",$myCoords);
$availablesDirs = array();
if in_array(($x + 1).",".$y, $busyCells){
if (in_array(($x + 1).",".$y, $busyCells)){
$availablesDirs[] = "x+";
}
if in_array(($x -1 ).",".$y, $busyCells){
if (in_array(($x -1 ).",".$y, $busyCells)){
$availablesDirs[] = "x-";
}
if in_array($x.",".($y + 1), $busyCells){
if (in_array($x.",".($y + 1), $busyCells)){
$availablesDirs[] = "y+";
}
if in_array($x.",".($y - 1), $busyCells){
if (in_array($x.",".($y - 1), $busyCells)){
$availablesDirs[] = "y-";
}