function playE2E() payable public {
        require(sE2E.bEnabled);
        require(msg.value >= sE2E.minBet && msg.value <= sE2E.maxBet);

        uint amountWon = msg.value * (50 + uint(keccak256(block.timestamp, block.difficulty, salt++)) % 100 - sE2E.houseEdge) / 100;
        require(msg.sender.send(amountWon));
        require(chip.transferFrom(manager, msg.sender, msg.value * sE2E.reward)); 

        
        for(uint i=0;i<5;i++) {
            if(sE2E.ranking.amount[i] < amountWon) {
                for(uint j=4;j>i;j--) {
                    sE2E.ranking.amount[j] = sE2E.ranking.amount[j-1];
                    sE2E.ranking.date[j] = sE2E.ranking.date[j-1];
                    sE2E.ranking.account[j] = sE2E.ranking.account[j-1];
                }
                sE2E.ranking.amount[i] = amountWon;
                sE2E.ranking.date[i] = now;
                sE2E.ranking.account[i] = msg.sender;
                break;
            }
        }
        
        for(i=4;i>0;i--) {
            sE2E.latest.amount[i] = sE2E.latest.amount[i-1];
            sE2E.latest.date[i] = sE2E.latest.date[i-1];
            sE2E.latest.account[i] = sE2E.latest.account[i-1];
        }
        sE2E.latest.amount[0] = amountWon;
        sE2E.latest.date[0] = now;
        sE2E.latest.account[0] = msg.sender;

        emit Won(amountWon > msg.value, "ETH", amountWon);
    }