Example #1
0
 /**
  * @param $name
  * @param $chips
  * @return Player
  */
 public function createPlayer($name, $chips)
 {
     $player = new Player($name);
     $player->addChips($chips);
     $this->players[] =& $player;
     return $player;
 }
Example #2
0
 protected function _before()
 {
     $del = new Player('Del');
     $del->addChips(500);
     $game = new Game();
     $game->addPlayer($del);
     $this->turn = new Roulette($del, $game);
 }
Example #3
0
 protected function _before()
 {
     $del = new Player('Del');
     $dave = new Player('Dave');
     $peter = new Player('Peter');
     $del->addChips(1000);
     $dave->addChips(1000);
     $peter->addChips(1000);
     $this->roulette = new Roulette();
     $this->roulette->addPlayer($del);
     $this->roulette->addPlayer($dave);
     $this->roulette->addPlayer($peter);
 }
Example #4
0
 protected function _before()
 {
     $del = new Player('Del');
     $del->addChips(500);
     $this->player = $del;
 }
Example #5
0
 public function testGetAndSetStrategy()
 {
     $this->player->setStrategy(new Fibonacci());
     $this->assertInstanceOf('Del\\Casino\\Strategy\\Fibonacci', $this->player->getStrategy());
 }
Example #6
0
 protected function _before()
 {
     $del = new Player('Del');
     $del->addChips(500);
     $this->bet = new Bet($del, new Colour(Colour::RED), 100, 2);
 }