function doRoll(address addr, uint bet, uint8 lines, uint blocknum, uint seed) private returns (uint) {
        uint[3] memory stops;
        uint winRate;
        uint entropy;
        (stops, winRate, entropy) = calcRoll(addr, blocknum, seed);

        uint wheel = stops[0]<<16 | stops[1]<<8 | stops[2];
        uint win = bet * winRate;

        
        if (winRate == 9999) {
            win = jackpotPool / 2;
            jackpotPool -= win;
        }


        rollTimes++;

        uint minipotWin = 0;
        
        if (0xffff / (entropy >> 32 & 0xffff) > (100 * (minipotTimes + 1)) - rollTimes) {
            minipotTimes++;
            minipotWin = minipotPool / 2;
            minipotPool -= minipotWin;
        }

        emit RollEnd(addr, bet, lines, uint32(wheel), win, minipotWin);

        return win + minipotWin;
    }