public Iterator moveIterator(){
		LinkedList<IMove> moves = new LinkedList<IMove>();
		
		
		LinkedList<MoveHolder> holder = new LinkedList<MoveHolder>();
		
		//Avoid null pointer exception at start of game when no dice has
		//been played
		//only generate takes if a dice has been played. 
		if(justPlayed!=null && lastMoveWasPlay){
		combination(null,dice[2],justPlayed.getValue(),holder);
	}else{
		holder.add(new MoveHolder());
	} //Add all of the possible flips
		LinkedList<MoveHolder> holder2 = new LinkedList<MoveHolder>();
		for (Die x : dice[getTurn()]){
			if(x.isFlippable()){
			for (MoveHolder y : holder){
				MoveHolder temp = new MoveHolder(y);
				
				temp.addMove(new Flip(x));
				holder2.add(temp);
			}
		}
		}
		//add all possible plays
		for(int i =0;i< dice[(getTurn()+1)%2].size();i++){
			for (MoveHolder x : holder){
			MoveHolder temp = new MoveHolder(x);
			temp.addMove(new Move(dice[(getTurn()+1)%2].get(i),this,i));
			holder2.add(temp);
		}
	}	
		//shuffle so every move gets an equal chance
		Collections.shuffle(holder2);
		return holder2.iterator();	
	
		
		
	}