function placeGame(
        uint rollUnder, 
        uint commitLastBlock, 
        uint commit, 
        bytes32 r, 
        bytes32 s,
        address inviter
    ) external payable {
        Game storage bet = bets[commit];
        require (bet.player == address(0), "Game should be in a 'clean' state.");
        require (msg.sender != inviter, "Player and inviter should be different");
        uint amount = msg.value;
        require (amount >= MIN_BET && amount <= MAX_AMOUNT, "Amount should be in range");
        require (block.number <= commitLastBlock, "Commit has expired");

        bytes memory prefix = "\x19Ethereum Signed Message:\n32";
        bytes32 signatureHash = keccak256(abi.encodePacked(prefix,commit));

        require (croupier == ecrecover(signatureHash, 27, r, s), "Invalid signature");
        require (rollUnder >= MIN_ROLL_UNDER && rollUnder <= MAX_ROLL_UNDER, "Roll under should be within range.");
        
        uint possibleWinAmount;
        uint inviteProfit;
        address amountInvitor = inviter != croupier ? inviter : 0;

        (possibleWinAmount,inviteProfit) = getDiceWinAmount(amount, rollUnder, amountInvitor);

        require (possibleWinAmount <= amount + maxProfit, "maxProfit limit violation.");

        lockedInBets += uint128(possibleWinAmount);
        lockedInviteProfits += uint128(inviteProfit);

        require ((lockedInBets + lockedInviteProfits)  <= address(this).balance, "Cannot afford to lose this bet.");

        emit Commit(commit);

        bet.amount = amount;
        bet.rollUnder = uint8(rollUnder);
        bet.placeBlockNumber = uint40(block.number);
        bet.player = msg.sender;
        bet.finished = false;
        if (inviter != croupier) {
            bet.inviter = inviter;
        }
    }