예제 #1
0
파일: Odds.php 프로젝트: andou/instantwin
 /**
  * 
  * @return boolean
  */
 public function check()
 {
     return \Andou\InstantWin::app()->getRand()->rand() <= \Andou\Instantwin::app()->getDistribution()->getOdds();
 }
예제 #2
0
 /**
  * Restituisce il numero di giocate fino a questo momento effettuate
  * 
  * @return int
  */
 protected function getPlaysCount()
 {
     return \Andou\InstantWin::app()->getPlay()->getPlaysCount();
 }
예제 #3
0
파일: index.php 프로젝트: andou/instantwin
<?php

define("NL", "\n");
require __DIR__ . "/vendor/autoload.php";
$app = \Andou\InstantWin::app();
if ($app->win()) {
    echo "thou win!" . NL;
} else {
    echo "thou not win! :(" . NL;
}