private Pair calculateEulerValue(Node n) {
		int[][] arr = n.state;
		int x = 0;
		int y = 0;
		boolean[][] visted = new boolean[height][width];
		for (int i = 0; i < height; i++) {
			for (int j = 0; j < width; j++) {
				if (arr[i][j] == 0) {
					continue;
				}
				if (!visted[i][j] && arr[i][j] == color) {
					x++;
					floodFill(i, j, arr, visted);
				} else if (!visted[i][j]) {
					y++;
					floodFill(i, j, arr, visted);
				}
			}
		}
		return new Pair(x, y);
	}