I am a beginner and have been playing around with C#. I have recently written the code for the very popular ‘Cows and Bulls’ word game. Its working for 2 players i.e; One player thinks of a word and the other person has to guess it. I am giving only 10 chances for guessing.
I now want to make the game for a single player(Computer v Human). I was wondering if there was anyway of getting all the 4 letter words in the English Language without Letter repetition(I have limited the game to 4 Letter words only). I know I can use an Enumeration and write down all the 4 letter words. But that’s Hard Coding the Words. That would be my last option.I could type all the words in,but I would then have some idea of the word if I play the game.
Assuming you have a list of words called
wordslistYou can use regex to select 4 letter unique words