public function dealRiver()
    {
        if ($this->dealer()->communityCards()->count() !== 4) {
            throw RoundException::riverHasBeenDealt();
        }
        if (($player = $this->whosTurnIsIt()) !== false) {
            throw RoundException::playerStillNeedsToAct($player);
        }

        $this->collectChipTotal();

        $seat = $this->table()->findSeat($this->playerWithSmallBlind());
        $this->resetPlayerList($seat);

        $this->dealer()->dealCommunityCards(1);
        $this->actions()->push(new Action($this->dealer(), Action::DEALT_RIVER, [
            'communityCards' => $this->dealer()->communityCards()->only(4),
        ]));
    }
public function dealRiver()
    {
        if ($this->dealer()->communityCards()->count() !== 4) {
            throw RoundException::riverHasBeenDealt();
        }
        if (($player = $this->whosTurnIsIt()) !== false) {
            throw RoundException::playerStillNeedsToAct($player);
        }

        $this->collectChipTotal();

        $seat = $this->table()->findSeat($this->playerWithSmallBlind());
        $this->resetPlayerList($seat);

        $this->dealer()->dealCommunityCards(1);
        $this->actions()->push(new Action($this->dealer(), Action::DEALT_RIVER, [
            'communityCards' => $this->dealer()->communityCards()->only(4),
        ]));
    }
public function dealRiver ( ) { if ( $ this -> dealer ( ) -> communityCards ( ) -> count ( ) !== 4 ) { throw RoundException :: riverHasBeenDealt ( ) ; } if ( ( $ player = $ this -> whosTurnIsIt ( ) ) !== false ) { throw RoundException :: playerStillNeedsToAct ( $ player ) ; } $ this -> collectChipTotal ( ) ; $ seat = $ this -> table ( ) -> findSeat ( $ this -> playerWithSmallBlind ( ) ) ; $ this -> resetPlayerList ( $ seat ) ; $ this -> dealer ( ) -> dealCommunityCards ( 1 ) ; $ this -> actions ( ) -> push ( new Action ( $ this -> dealer ( ) , Action :: DEALT_RIVER , [ 'communityCards' => $ this -> dealer ( ) -> communityCards ( ) -> only ( 4 ) , ] ) ) ; }
Deal the river card.
Deal the river card .