public static int countCells(Board board, int x, int y, int radius) {
		int result = 0;
		for (int px = x-radius; px <= x+radius; px++)
			if (px >= 0 && px < board.w)
				for (int py = y-radius; py <= y+radius; py++)
					if (py >= 0 && py < board.h)
						if (board.cells[px][py])
							result++;
		return result;
	}