/** * @param $name * @param $chips * @return Player */ public function createPlayer($name, $chips) { $player = new Player($name); $player->addChips($chips); $this->players[] =& $player; return $player; }
protected function _before() { $del = new Player('Del'); $del->addChips(500); $game = new Game(); $game->addPlayer($del); $this->turn = new Roulette($del, $game); }
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); }
protected function _before() { $del = new Player('Del'); $del->addChips(500); $this->player = $del; }
public function testGetAndSetStrategy() { $this->player->setStrategy(new Fibonacci()); $this->assertInstanceOf('Del\\Casino\\Strategy\\Fibonacci', $this->player->getStrategy()); }
protected function _before() { $del = new Player('Del'); $del->addChips(500); $this->bet = new Bet($del, new Colour(Colour::RED), 100, 2); }