public boolean checkAdjacent(int x, int y) {
		boolean lost = false;
		int tempX = -1, tempY = -1, flags = 0;
		for (int i = -1; i < 2; i++) {
			for (int j = -1; j < 2; j++) {
				try {
					if (matrix[x + j][y + i].isFlagged()) flags++;
					else {
						if (mines[x + j][y + i] == -1) {
							lost = true;
							tempX = x + j;
							tempY = y + i;
						}
					}
				} catch (ArrayIndexOutOfBoundsException e) {
				}
			}
		}
		if (flags == mines[x][y]) {
			if (lost) {
				matrix[tempX][tempY].click(false);
				return true;
			} else return clickAdjacent(x, y);
		}
		return false;
	}