function _auction(uint256 value, address invitorAddr) internal {
    bool ended = (block.timestamp > gameLastAuctionTime + gameSecondLeft) ? true: false;
    if (ended) {
      revert('this round end!!!');
    }

    uint256 len = gameAuction[gameId].length;
    if (len > 1) {
      address bidder = gameAuction[gameId][len - 1].addr;
      if (msg.sender == bidder)
        revert("wrong action");
    }

    uint256 gap = _getGameAuctionGap();
    uint256 auctionValue = gap + gameLastAuctionMoney;
    uint256 maxAuctionValue = 3 * gap + gameLastAuctionMoney;

    if (value < auctionValue) {
      revert("wrong eth value!");
    }


    if (invitorAddr != 0x00) {
      registerInvitor(msg.sender, invitorAddr);
    } else
      invitorAddr = getInvitor(msg.sender);


    if (value >= maxAuctionValue) {
      auctionValue = maxAuctionValue;
    } else {
      auctionValue = value;
    }

    gameLastAuctionMoney = auctionValue;
    _inMoney(auctionValue, invitorAddr);
    gameLastAuctionTime = block.timestamp;

    
    
    gameSecondLeft = _getMaxAuctionSeconds();

    PlayerAuction memory p;
    gameAuction[gameId].push(p);
    gameAuction[gameId][gameAuction[gameId].length - 1].addr = msg.sender;
    gameAuction[gameId][gameAuction[gameId].length - 1].money = value;
    gameAuction[gameId][gameAuction[gameId].length - 1].bid = auctionValue;
    gameAuction[gameId][gameAuction[gameId].length - 1].refunded = false;
    gameAuction[gameId][gameAuction[gameId].length - 1].dividended = false;

    emit GameAuction(gameId, msg.sender, value, auctionValue, gameSecondLeft, block.timestamp);
  }