function endDutchAuction(uint256 _x, uint256 _y)
    public
    validRange(_x, _y)
  {
    Pixel memory pixel = pixelByCoordinate[_x][_y];
    Auction memory auction = auctionById[pixel.auctionId];

    require(pixel.auctionId != 0);
    require(auction.endTime < block.timestamp);

    
    address winner = _endDutchAuction(_x, _y);
    _updatePixelMapping(winner, _x, _y, auction.currentPrice, 0, "");

    
    _subFromValueHeld(pixel.seller, pixel.price, true);
    _addToValueHeld(winner, auction.currentPrice);

    uint256 tokenId = _encodeTokenId(_x, _y);
    removeTokenFrom(pixel.seller, tokenId);
    addTokenTo(winner, tokenId);
    emit Transfer(pixel.seller, winner, tokenId);

    emit EndDutchAuction(
      pixel.id,
      tokenId,
      winner,
      _x,
      _y
    );
  }