private int incrementID(int inIndex, int[] inPerm) {
		// returns the next possible ID not used by a previous index.
		
		if(inIndex == -1) return -1;
		int n = inPerm[inIndex];
		boolean p = false;
		do{			
			n = (n + 1) % (NumPlayers + 1);
			p = false;
			for(int i = 0; i < inIndex;i++){ // check for duplicates
				if(n == inPerm[i]) p = true;
			}
		} while(p);
		
		return n;
		
	}