From b22dac43efcd71d16fd8788e27f76ac8b229d30c Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 4 Jul 2016 22:55:05 +0200 Subject: [PATCH] fix php --- src/arenas/tron/act.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/arenas/tron/act.php b/src/arenas/tron/act.php index 88a5449..397fd9b 100644 --- a/src/arenas/tron/act.php +++ b/src/arenas/tron/act.php @@ -114,13 +114,14 @@ switch ($_POST['act']){ $busyCells = array_merge($busyCells, $bots[$botCount]->getTail()); $responses[$botCount] = get_IA_Response($bots[$botCount]->getURL(),$messageArr); - if(in_array($responses[$botCount]['responseArr'], $busyCells)){ + + if(in_array($responses[$botCount]['responseArr']['play'], $busyCells)){ //this bot plays on a non empty cell, it looses $bots[$botCount]->loose(); $logs.= $bots[$botCount]->getName()." Played on a non empty cell, he loses.
"; $loosingBots[] = $bots[$botCount]->getName(); }else{ - $targets[] = $responses[$botCount]['responseArr']; + $targets[] = $responses[$botCount]['responseArr']['play']; } }