Space[][] getOpenSets(Space sp) {
		Space[][] sets = new Space[getNumOpenSets(sp)][3];
		int index = 0;
		if (getNumOpenSets(sp) != 0) {
			if (isOpenForPiece(board[sp.getX()], sp.getPiece())) {
				sets[index] = board[sp.getX()];
				index++;
			}
			if (isOpenForPiece(getColumn(sp.getY()), sp.getPiece())) {
				sets[index] = getColumn(sp.getY());
				index++;
			}
			if (sp.diagID % 2 == 0
					&& isOpenForPiece(getTopDownDiag(), sp.getPiece())) {
				sets[index] = getTopDownDiag();
				index++;
			}
			if (sp.diagID % 3 == 0
					&& isOpenForPiece(getBottomUpDiag(), sp.getPiece())) {
				sets[index] = getBottomUpDiag();
				index++;
			}
		}
		return sets;
	}