/** * @param \Application\Model\Hand $hand * @return \Application\Model\GameSession */ public function addCard(Hand $hand) { if (!$hand->isCompleted() && !$this->isFinished()) { $card = array_shift($this->deck); $value = $this->cards[$card]; $hand->addCard($card, $value); } return $this; }