function withdraw()
        public
        isActivated()
    {
        uint256 _pID = getPlayerID();
        endRoundAndGetEarnings(_pID);

        uint256 _dividends;
        uint256 _luckBonus;
        (_dividends,_luckBonus) = withdrawEarnings(_pID);
        uint256 _earnings = _dividends.add(_luckBonus);
        if (_earnings > 0)
            plyr_[_pID].addr.transfer(_earnings);

        emit onWithdraw(msg.sender, _pID, rID_, _earnings, _dividends, _luckBonus);
    }