public int place(Piece piece, int x, int y) {
		// flag !committed problem
		if (!committed) throw new RuntimeException("place commit problem");
		boolean sanityCheck = true;
		
		// get candidate squares for placement
		TPoint[] coordPts = getCoords(piece, x, y);
		
		// check if piece is in bounds, if square is currently obstructed 
		for (int i = 0; i < coordPts.length; i++) {
			int checkX = coordPts[i].x;
			int checkY = coordPts[i].y;
			
			if (!inBounds(checkX, checkY)) {
				int result = PLACE_OUT_BOUNDS;
				sanityCheck = false;
				return result;
			}
			
			if (grid[checkX][checkY] == true) {
				int result = PLACE_BAD;
				sanityCheck = false;
				return result;
			}
		}
		// place is at least OK by this point.
		int result = PLACE_OK;
		
		// save backup values in case of undo()
		saveBackup();
		
		// update widths[], heights[], maxHeight, and
		// method returns whether a row was filled
		if(updateAfterPlace(coordPts)) result = PLACE_ROW_FILLED;
		
		if (sanityCheck) sanityCheck();
		committed = false;
		return result;
	}