Exemplo n.º 1
0
 public function authorize($params)
 {
     if ($this->_user === null) {
         $this->_user = new ItemUser($params['sid']);
     }
     return $this->_user->check_auth();
 }
Exemplo n.º 2
0
 public function won($win_lines, $bonus = false)
 {
     $won = 0;
     if (!$bonus) {
         $this->_won = 0;
     }
     $this->_bonus_won = 0;
     foreach ($win_lines as $line) {
         foreach ($line as $combination) {
             $won += $this->_bet * $this->_denomination * $combination->multy;
         }
     }
     if ($this->_game->getIsBonus()) {
         echo '<br>Bonus_WON<br>';
     }
     echo '<pre>';
     echo 'WON:';
     var_dump($won);
     echo '</pre>';
     if (!MySQLDBase::$instance->Update(array('table' => TBL_BETS, 'fields' => array('won' => $won), 'match' => array('id' => $this->_id)))) {
         return false;
     }
     if ($won) {
         if ($bonus) {
             $this->_bonus_won = $won;
             return $this->_user->pay($won);
         }
         $this->_won = $won;
         return $this->_user->pay($won);
     }
     return true;
 }