本文整理匯總了PHP中User_Model::lost方法的典型用法代碼示例。如果您正苦於以下問題:PHP User_Model::lost方法的具體用法?PHP User_Model::lost怎麽用?PHP User_Model::lost使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類User_Model
的用法示例。
在下文中一共展示了User_Model::lost方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
function play_game($shotbox)
{
$usuario = new User_Model();
$toView["view"] = 'battlefield_view';
$toView["userHit"] = $this->user_play($shotbox);
$toView["fired"] = $this->sesion->obtener('fired');
if ($this->check_player() == 1) {
$id = $this->sesion->obtener('id');
$usuario->won($id);
$usuario->finished($id);
$usuario->avgMoves($id, $tries);
$usuario->setRanking($id);
$toView["enemyFleet"] = $this->sesion->obtener('enemyFleet');
$toView["winner"] = 1;
$toView["userHits"] = $this->sesion->obtener('userHits');
$toView["enemyHits"] = $this->sesion->obtener('enemyHits');
$toView["view"] = "results_view";
return $toView;
}
$toView["enemyHit"] = $this->enemy_play();
$toView["userFleet"] = $this->sesion->obtener('userFleet');
if ($this->check_enemy() == 1) {
$id = $this->sesion->obtener('id');
$usuario->lost($id);
$usuario->finished($id);
$usuario->setRanking($id);
$toView["enemyFleet"] = $this->sesion->obtener('enemyFleet');
$toView["winner"] = 2;
$toView["userHits"] = $this->sesion->obtener('userHits');
$toView["enemyHits"] = $this->sesion->obtener('enemyHits');
$toView["view"] = 'results_view';
return $toView;
}
return $toView;
}