@param Player      $player
@param null|string $message

@return static
182402
public static function playerStillNeedsToAct(Player $player, $message = null)
    {
        $defaultMessage = sprintf('%s still needs to act.', $player);
        $message = null === $message ? $defaultMessage : $message;

        return new static($message);
    }
750550
public static function setPlayerLoc($validator, $loc, $playerEmbedded, $playerAutoPlay)
    {
        self::validateInput(
            $loc,
            $validator,
            'validatePlayerLoc',
            self::$exception,
            'Provided player URL is not a valid value.'
        );

        self::$tag = '<video:player_loc';
        self::setPlayerEmbedded($validator, $playerEmbedded);
        self::setPlayerAutoPlay($validator, $playerAutoPlay);

        self::$tag .= '>'.$loc.'</video:player_loc>';

        return self::$tag;
    }
102369
public static function create($validator, $message = null)
    {
        $class = self::checkValidator($validator);

        /** @var ValidatorInterface $object */
        $object = new $class;
        if (!is_null($message)) {
            $object->setMessage($message);
        }
        return $object;
    }
143846
public static function fromClient(Client $client): PlayerContract
    {
        return new self($client->id(), $client->name(), $client->wallet());
    }
488773
public static function invalidArgument($message = null)
    {
        $defaultMessage = sprintf('Invalid argument passed in GameParameters.');
        $message = null === $message ? $defaultMessage : $message;

        return new static($message);
    }
937939
public function fixName(): Player
    {
        $this->name = $this->getDataFetcher()->fetchRealName($this->getName());

        return $this;
    }
123919
public static function message($name, $message = null)
    {
        if (func_num_args() === 2) {
            return static::$_messages[$name] = $message;
        }
        return isset(static::$_messages[$name]) ? static::$_messages[$name] : static::$_messages['_default_'];
    }
983099
protected function setPlayerLoc($loc, $playerEmbedded, $playerAutoPlay)
    {
        self::$xml['player_loc'] = VideoItemPlayerTags::setPlayerLoc(
            $this->validator,
            $loc,
            $playerEmbedded,
            $playerAutoPlay
        );

        return $this;
    }
1149830
public function playerHand(PlayerContract $player): Hand
    {
        $hand = $this->hands()->findByPlayer($player);

        if ($hand === null) {
            throw RoundException::playerHasNoHand($player);
        }

        return $hand;
    }
1348379
public function playerFoldsHand(PlayerContract $player)
    {
        $this->checkPlayerTryingToAct($player);

        $this->actions()->push(new Action($player, Action::FOLD));

        $this->foldedPlayers->push($player);
        $this->leftToAct = $this->leftToAct()->removePlayer($player);
    }
41771
public static function fromString(string $cards, Player $player)
    {
        $cards = explode(' ', $cards);

        return static::create(CardCollection::make($cards)->map(function ($card) {
            return Card::fromString($card);
        }), $player);
    }
253954
public static function cantCheckWithBetActive($message = null)
    {
        $defaultMessage = 'Cannot check when there has been a bet made';
        $message = null === $message ? $defaultMessage : $message;

        return new static($message);
    }
983741
public static function notRegistered(Client $player, Game $game, $message = null)
    {
        $defaultMessage = sprintf('%s is not registered to game: "%s"', $player, $game);
        $message = is_null($message) ? $defaultMessage : $message;

        return new static($message);
    }
708870
public static function selectPlayerItem(
        $statisticState,
        $playerKey
    ) {
        $statisticState = (object) $statisticState;
        $playerKey = (string) $playerKey;

        $playerItem = $statisticState->player->$playerKey;

        return $playerItem;
    }
787616
function getPlayerInfo($player, $compatibility = 1, $multicall = false)
    {
        $login = $this->getLogin($player);
        if ($login === false) {
            throw new InvalidArgumentException('player = ' . print_r($player, true));
        }
        if ($compatibility !== 0 && $compatibility !== 1) {
            throw new InvalidArgumentException('compatibility = ' . print_r($compatibility, true));
        }

        if ($multicall) {
            return $this->execute(ucfirst(__FUNCTION__), array($login, $compatibility), $this->structHandler('PlayerInfo'));
        }
        return Structures\PlayerInfo::fromArray($this->execute(ucfirst(__FUNCTION__), array($login, $compatibility)));
    }
750861
function getValidationReplay($player, $multicall = false)
    {
        $login = $this->getLogin($player);
        if ($login === false) {
            throw new InvalidArgumentException('player = ' . print_r($player, true));
        }

        if ($multicall) {
            return $this->execute(ucfirst(__FUNCTION__), array($login), function ($v) {
                return $v->scalar;
            });
        }
        return $this->execute(ucfirst(__FUNCTION__), array($login))->scalar;
    }
114016
public static function setMessage($message, $from = null, $color = null)
    {
        if (!empty($from)) {
            static::setFrom($from);
        }
        if (!empty($color)) {
            static::setColor($color);
        }

        if (is_object($message)) {
            static::$message = $message;
        } else {
            static::$message = new Message();
            static::$message->setMessage($message);
            static::$message->setFrom(static::getFrom());
            static::$message->setColor(static::getColor());
        }
    }