public int surroundingBombs(int x, int y) // checks surrounding 8 squares
												// for number of bombs (it does
												// include itself, but has
												// already been checked for a
												// bomb so it won't matter)
	{
		int surBombs = 0;
		for (int q = x - 1; q <= x + 1; q++) {
			for (int w = y - 1; w <= y + 1; w++) {
				while (true) {
					if (q < 0 || w < 0 || q >= row || w >= col) // makes sure
																// that it wont
																// have an error
																// for buttons
																// next to the
																// wall
						break;
					if (bomb[q][w] == true)
						surBombs++;
					break;
				}
			}
		}
		return surBombs;
	}