private Set<ICard> createSet(Set<ICard> allCards, Set<IConstraint> constraints, boolean randomize){
		Set<ICard> goodCards = new HashSet<ICard>();
		
		int size = allCards.size();
		int tryCount=0,rand=size;
		int[] alreadyCheckedCards = new int[size*size*size*2];
		ICard[] allCardsArray = new ICard[size*size];
		allCards.toArray(allCardsArray);
		ICard tempCard = null;
		
		//System.out.println("solve().allCardsSize: " + allCards.size());
		//System.out.println("randomize: " + randomize);
		if(randomize){
			while(goodCards.size()!=10){
				rand = new Random().nextInt(size);
				
				if(!isNumberAlreadyTested(rand,alreadyCheckedCards)){
					tempCard = allCardsArray[rand];
					if(!cardFulfillsConstraint(tempCard,constraints))
						goodCards.add(tempCard);
				}
				
				alreadyCheckedCards[tryCount]=rand;
				
				if(goodCards.size()==10){
					//System.out.println("Lösung gefunden! CardCount: " + goodCards.size());
					return goodCards;
				} else if(tryCount>size*size)
					throw new NoSolutionFoundException("goodCards.size: " + goodCards.size(),constraints);
				
				tryCount++;
			}
			
		} else {
			for(int i=0;i<size;i++){
				tempCard = allCardsArray[i];
				if(cardFulfillsConstraint(tempCard,constraints))
					goodCards.add(tempCard);
				
			}
			return goodCards;
		}
		throw new NoSolutionFoundException("",constraints);		
	}