R0J0hound I should have explained my problem better. So I've got dictionaries that contain all 3 letter, 4 letter, 5 letter and 6 letter words in the English language. Now I wanted to check how many of these words that can be created with the 6 characters the computer randomly generates.
For example if I have these letters: [E,c,r,s,u,i] I could spell "cruise" or "rise".
Originally I made a loop that generated all possible combinations. I then checked how many matches this list would get in each dictionary. (obviously removing letters from right when checking the dictionaries with words fewer than 6 letters.)
The problem with that solution was that it generated combinations like eeeeec,eeeeer and so on. Basically it used every character more than once so I ended up with about 40k combinations. Naturally that resulted in too many matches because the player can use every character only once.
I figured out that there are 720 combinations if you use every letter only once.
If you have these 6 letters. [abcdef] you can create 720 6 character combinations
(ab) (ba) then add third character
[(cab) (acb) (ABC)] [(cba) (bca) (bac)] then add 4th character
(dcab) (cdab) (cadb) (cabd).... The last line would be 720 combinations. I wanted to take these combinations and replace the characters with whatever letters the computer gave me and check how many matches that would give me in the dictionaries with English words.
Then when the letters change it would automatically check how many words that can be created with the new set of letters.
@korbaach I will look at the capx and see what I can make of it when I get home tommorow or later this week. I only got access to my cellphone now so I can't open construct for a while.
I hope you understand what I am trying to do. I'm not very used to producing text in English since its not my first or even second language but I tried to the best of my ability.
Thank you for the help!
Edit: textmechanic.com/text-tools/comb ... generator/ found this on internet while browsing! This is what I'm talking about. Generate a dictionary with all combinations of 6 characters by using every character only once.