本文整理汇总了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;
}