private static byte[] getMovedTiles(final String pathStr, final byte[] initState) {
		final int pathLength = pathStr.length(), boardLength = initState.length, dimension = PuzzleConfiguration
				.getDimension();
		final byte[] movedTiles = new byte[pathLength], boardConfig = new byte[boardLength];
		int posOfSpace = -1;
		for (int i = boardLength - 1; i >= 0; --i) {
			final byte tile = initState[i];
			if (tile == 0) {
				posOfSpace = i;
			}
			boardConfig[i] = tile;
		}
		for (int i = 0; i < pathLength; ++i) {
			final char dir = pathStr.charAt(i);
			int posOfTile;
			if (dir == 'L') {
				posOfTile = posOfSpace - 1;
			} else if (dir == 'R') {
				posOfTile = posOfSpace + 1;
			} else if (dir == 'U') {
				posOfTile = posOfSpace - dimension;
			} else {
				posOfTile = posOfSpace + dimension;
			}
			movedTiles[i] = boardConfig[posOfTile];
			swap(posOfSpace, posOfTile, boardConfig);
			posOfSpace = posOfTile;
		}
		return movedTiles;
	}