/** * Append new move to the game * @param $move * @return Array */ public function appendMove($move) { if (!$this->getId()) { $this->commit(); } $move = $this->gameParser()->getParsed($move); $move['game_id'] = $this->getId(); $move['fen_id'] = Fen::getIdByFen($move['fen']); $m = new Move(); $m->setValues($move); $m->commit(); return $move; }