/** * {@inheritdoc} */ public function getLastState() { return $this->states->last() ?: null; }
/** * {@inheritdoc} * * @return $this */ public function addState(PersistableGameStateInterface $state) { $state->setGame($this); $this->states->add($state); return $this; }