private int getNeighbours(int x, int y) {
		int nNeighbours = 0;
		for (int deltaX = -1; deltaX <= 1; deltaX++) {
			int nextX = x + deltaX;
			if (nextX == width) {
				// nextX = 0;
				continue;
			} else if (nextX < 0) {
				// nextX = width - 1;
				continue;
			}

			for (int deltaY = -1; deltaY <= 1; deltaY++) {
				if ((deltaX == 0) && (deltaY == 0)) {
					continue;
				}

				int nextY = y + deltaY;
				if (nextY == height) {
					// nextY = 0;
					continue;
				} else if (nextY < 0) {
					// nextY = height - 1;
					continue;
				}

				if (getCellAt(nextX, nextY))
					nNeighbours++;
			}
		}

		return nNeighbours;
	}