function play(bool startNewGameIfIdle) external payable {
        
        _processGameEnd();
        
        if (!gameStarted) {
            
            require(!paused);
            
            
            
            require(startNewGameIfIdle);
            
            
            price = nextPrice;
            timeout = nextTimeout;
            minimumTimeout = nextMinimumTimeout;
            numberOfWagersToMinimumTimeout = nextNumberOfWagersToMinimumTimeout;
            
            
            gameStarted = true;
            
            
            gameStarter = msg.sender;
            
            
            Start(msg.sender, block.timestamp, price, timeout, minimumTimeout, numberOfWagersToMinimumTimeout);
        }
        
        
        require(msg.value >= price);
        
        
        uint256 fee = price.mul(feePercentage).div(100000);
        uint256 dividend = price.mul(gameStarterDividendPercentage).div(100000);
        uint256 wagerPoolPart;
        
        if (wagerIndex % 7 == 6) {
            
            
            
            uint256 wagerPrize = price.mul(2);
            
            
            wagerPoolPart = wagerPrize.sub(wagerPool);
        
            
            msg.sender.transfer(wagerPrize);
            
            
            wagerPool = 0;
        } else {
            
            
            
            wagerPoolPart = price.mul(2).div(7);
            
            
            wagerPool = wagerPool.add(wagerPoolPart);
        }
        
        
        uint256 currentTimeout = calculateTimeout();
        
        
        lastPlayer = msg.sender;
        lastWagerTimeoutTimestamp = block.timestamp + currentTimeout;
        prizePool = prizePool.add(price.sub(fee).sub(dividend).sub(wagerPoolPart));
        
        
        Play(msg.sender, block.timestamp, lastWagerTimeoutTimestamp, wagerIndex, prizePool);
        
        
        _sendFunds(gameStarter, dividend);
        
        
        wagerIndex = wagerIndex.add(1);
        
        
        
        
        uint256 excess = msg.value - price;
        
        if (excess > 0) {
            msg.sender.transfer(excess);
        }
    }