src/RecordedGame.php
public function getPlayer($id)
    {
        foreach ($this->header()->players as $player) {
            if ($player->index === $id) {
                return $player;
            }
        }
    }
public function getPlayer($id)
    {
        foreach ($this->header()->players as $player) {
            if ($player->index === $id) {
                return $player;
            }
        }
    }
public function getPlayer ( $ id ) { foreach ( $ this -> header ( ) -> players as $ player ) { if ( $ player -> index === $ id ) { return $ player ; } } }
Get a player by their index.

@param int  $id  Player index.
@return \RecAnalyst\Model\Player|null
Get a player by their index .