コード例 #1
0
ファイル: SplitTest.php プロジェクト: delboy1978uk/casino
 public function testProcessBet()
 {
     $this->type = new Split(31, 34);
     $bet = new Bet($this->player, $this->type, 100);
     $this->assertFalse($bet->getType()->processBet(0));
     //        $this->assertTrue($bet->getType()->processBet(31));
     $this->assertFalse($bet->getType()->processBet(20));
     $this->assertTrue($bet->getType()->processBet(34));
 }
コード例 #2
0
ファイル: ColourTest.php プロジェクト: delboy1978uk/casino
 public function testProcessBet()
 {
     $this->type = new Colour(Colour::RED);
     $bet = new Bet($this->player, $this->type, 100, 2);
     $this->assertFalse($bet->getType()->processBet(0));
     $this->assertTrue($bet->getType()->processBet(1));
     $this->assertFalse($bet->getType()->processBet(2));
     $this->assertTrue($bet->getType()->processBet(3));
 }
コード例 #3
0
ファイル: NumberTest.php プロジェクト: delboy1978uk/casino
 public function testProcessBet()
 {
     $this->type = new Number(17);
     $bet = new Bet($this->player, $this->type, 100);
     $this->assertFalse($bet->getType()->processBet(0));
     $this->assertTrue($bet->getType()->processBet(17));
     $this->assertFalse($bet->getType()->processBet(31));
     $this->assertFalse($bet->getType()->processBet(34));
 }
コード例 #4
0
ファイル: Roulette.php プロジェクト: delboy1978uk/casino
 private function processBet(Bet $bet, $num)
 {
     return $bet->getType()->processBet($num);
 }
コード例 #5
0
ファイル: RouletteTest.php プロジェクト: delboy1978uk/casino
 public function testGetType()
 {
     $this->assertInstanceOf('Del\\Casino\\Game\\Bet\\Type\\Roulette\\Colour', $this->bet->getType());
 }