/** * @param Client $client * @return State */ function create(Client $client) { $url = $client->hostUrl . $this->path; return $client->send($url, $this->params); }
function play() { $this->robot->play($this->state, $move = new Move()); $this->state = $this->client->send($this->state->playUrl, array('dir' => (string) $move)); }