function buffadjacent($value) { $att = new attack($this->id, $this->position, $this->id, $this->user, $this->field); $adjacent = $att->getAdjecentCards(); for ($i = 0; $i < 4; $i++) { if ($adjacent[$i]->cardid != 0) { $adjacent[$i]->top += $value; $adjacent[$i]->right += $value; $adjacent[$i]->bottom += $value; $adjacent[$i]->left += $value; updateFieldCard($adjacent[$i]->tempID, $adjacent[$i]->top, $adjacent[$i]->right, $adjacent[$i]->bottom, $adjacent[$i]->left); } } }
echo '</div>'; } $turn = getTurn($id); $yourturn = false; if ($turn % 2 == 0) { if (getRedPlayer($id) == getUserID($id)) { $yourturn = true; } } else { if (getBluePlayer($id) == getUserID($id)) { $yourturn = true; } } $field = new hand(getField($id), true); if (isset($_GET["position"]) && isset($_GET["card"]) && $_GET["card"] != 0 && $yourturn == true) { $attack = new attack($id, $_GET["position"], $_GET["card"], getUserID(), $field, $hand); $endturn = $attack->attack(); $field = new hand(getField($id), true); } /********************************************************************************************************************** * Show Blue Player Points **********************************************************************************************************************/ echo '<center><h2 style="color: #000077;">' . getBluePoints($id) . '</h2>'; /********************************************************************************************************************** * Configurate end turn (button) **********************************************************************************************************************/ if (isset($_POST["endturn"])) { $endturn = $_POST["endturn"]; } if ($turn != 0) { if ($turn % 2 == 0) {