public int place(Piece piece, int x, int y) {
		// flag !committed problem
		if (!committed) throw new RuntimeException("place commit problem");
			
		int result = PLACE_OK;
		
		committed = false;
		// YOUR CODE HERE
		// backup grid status.
		for (int i = 0; i < grid.length; i++) 
			System.arraycopy(grid[i], 0, grid_backup[i], 0, grid[i].length);
		
		for (TPoint point : piece.getBody()) {
			int placeToPutAtX = point.x + x;
			int placeToPutAtY = point.y + y;
			if (x < 0 || y < 0 ||placeToPutAtX > width-1 || placeToPutAtY > height-1) {
				result = PLACE_OUT_BOUNDS;
				//undo();
				break;
			} else if (grid[placeToPutAtX][placeToPutAtY]) {
				result = PLACE_BAD;
				//undo();
				break;
			} else {
				grid[placeToPutAtX][placeToPutAtY] = true;
				if (width == getRowWidth(placeToPutAtY))
					result = PLACE_ROW_FILLED;
			}
		}
		
		sanityCheck();
		return result;
	}