private int solve(String[] redPieces, String[] blackPeices, String whoseTurn) {
		String find = whoseTurn.equals("R") ? "B" : "R";
		int count = 0;
		String c = null;
		for (int i = 0; i < emptypeices.length; i++) {
			c = emptypeices[i];
			if (emptypeices[i] != null) {
				int a = Character.getNumericValue(emptypeices[i].charAt(0));
				int b = Character.getNumericValue(emptypeices[i].charAt(1));

				getCount(a, b, find, whoseTurn);
				int resultCount = 0;
				// printGrig(grid);
				String[] wt = findWhoseTurn(whoseTurn);
				for (String l : wt) {
					if (l != null) {
						getCount(Character.getNumericValue(l.charAt(0)), Character.getNumericValue(l.charAt(1)), find, whoseTurn);

					}
				}
				for (int k = 0; k < 8; k++) {
					for (int m = 0; m < 8; m++) {
						if (grid[k][m] == whoseTurn) {
							resultCount++;
						}
					}
				}

				resultCount++;
				// System.out.println(resultCount);
				if (resultCount > count) {
					count = resultCount;
				}

				grid = createGrid(redPieces, blackPeices);
				// System.out.println(c + " is  " + count);
				// printGrig(grid);
			}

		}
		return count;

	}