GUILD_COST)); } } /** * Hire one miner. * Debits MINER_COST from the player's gold. * * @return void */ function hireMiner(){ if(!isset($_SESSION["guild"])){ sendError("guild_not_yet_created"); } elseif(debitAccount(MINER_COST)){ $_SESSION["mine"]["miners"]++; echo json_encode(array("cost" => MINER_COST , "miners" => $_SESSION["mine"]["miners"])); } } /** * Returns the number of miners currently in the guild. * * @return int number of miners in the guild */ function sendMiners(){ return $_SESSION["mine"]["miners"]; } ?>