public int place(Piece piece, int x, int y) {
		// flag !committed problem
		if (!committed) throw new RuntimeException("place commit problem");
		committed = false;
		backup();
		int result = PLACE_OK;
		int pieceX,pieceY;

		TPoint body[] = piece.getBody();
		for(int i =0; i < body.length;i++)
		{
			pieceX = x+body[i].x;
			pieceY = y+body[i].y;

			if(pieceX<0 || pieceY< 0 || pieceX>=width || pieceY >=height )
			{
				result = PLACE_OUT_BOUNDS;
				break;
			}

			if(grid[pieceX][pieceY])
			{
				result = PLACE_BAD;
				break;
			}

			grid[pieceX][pieceY] = true;

			if(heights[pieceX]<pieceY+1)
				heights[pieceX]=pieceY+1;

			widths[pieceY]++;

			if(widths[pieceY] == width)
				result = PLACE_ROW_FILLED;
		}
		recomputeMaxheight();
		sanityCheck();
		return result;
	}