src/TicTacToe.php
public function makeMove(array $boardState, $player = Game::PLAYER_A)
    {
        $this->setBoard($boardState);

        $recommendedMove =  $this->getMove($player) ?: [];

        return $recommendedMove ? array_merge($recommendedMove , [$player]): [];
    }
public function makeMove(array $boardState, $player = Game::PLAYER_A)
    {
        $this->setBoard($boardState);

        $recommendedMove =  $this->getMove($player) ?: [];

        return $recommendedMove ? array_merge($recommendedMove , [$player]): [];
    }
public function makeMove ( array $ boardState , $ player = Game :: PLAYER_A ) { $ this -> setBoard ( $ boardState ) ; $ recommendedMove = $ this -> getMove ( $ player ) ? : [ ] ; return $ recommendedMove ? array_merge ( $ recommendedMove , [ $ player ] ) : [ ] ; }
Get move for a particular player

@param array $boardState
@param string $player
@return array
Get move for a particular player