The Game of Bulls 'n' Cows — Little Mastermind-like word-guessing game made as part of Ben Tristem's Unreal course on Udemy.
The reference version of the game is available here.
Major changes and additions include:
- Redesigned structure of the code with all the code for printing to the console in its own FBullCowView class, and control of the game moved from main to a dedicated FBullCowGame class.
- Support of custom external dictionaries. The path to a dictionary file can be passed as an argument to the program.
- Word-length selection.
- The list of past guesses is updated and printed each turn.
Apart from curating better dictionaries for the game, the main improvement that could still be made is the tuning of the difficulty, i.e. the number of tries granted to the player. Perhaps even make it dynamical, with various settings, or according to player success or feedback.
Three different dictionaries are provided:
- isograms.txt, the default, is derived from one of Wiktionary's frequency lists (3683 words)
- isograms_nouns.txt is inspired by a reduced list of common nouns for an easier selection. (579 words)
- isograms_all.txt is a much bigger list containing potentially all English words. (62229 words)
All of these are filtered for letter-only isograms and trimmed of words that are less than 3 letters, plus some additional selection depending on the list (removing too long words to keep large enough sets of each size, etc.).
The game features ASCII cows from the vast collections curated by David A. Bader.
I also want to thank Lukáš Venhoda and Dan Marshall for useful comments.