How did yours end?

I merely added so that the player can chose the length of word thereby choosing the difficulty and also the conditions if the player chooses a word length other than what’s on the instructions.

I have implemented a number of changes, based off feedback from playtesting, as well as features that I thought should be included.

Firstly, I explained the game more explicitly - my playtesters had no idea what they were doing until I explained the rules of the game to them. They also needed the concept of Bulls and Cows more clearly explained. I thought it was worth explaining what an isogram was as well, to try to prevent players from every reaching the ‘repeated letter’ error message, though that is still in there as a safety measure!

Secondly, I implemented a system for players to choose the length of word that they wanted to play with. It currently simply selects from an array containing 5 words, varying from 3 to 7 letters in length. I am assuming that we will be importing a long list of words to play with in the next section, so I did not attempt that myself.

As a result of implementing a choice of word length, I decided to implement error messages for the player’s choice here. Error messages exist for void inputs, inputs which aren’t a number, and numbers which are outside the specified range.

I also updated guess validity checking to include checking for guesses containing a space, and checking for guesses that have already been tried (i.e. entering the same exact word twice).

Finally, I updated the game over message to reveal the hidden word to the player.

There are still changes that I want to make, although many of them wont be possible until I take the game across into UE4, such as implementing an optional system to highlight the bulls in the word, or an interface to allow players to mark off letters that they know aren’t in the word, or that they know aren’t in certain positions within the word.

I think I’m getting the hang of C++ and I’m keen to start the next section ASAP! :smiley:

Hi everybody,

Here is my code. I added a randomizer that determines what word the player has to guess.

Bulls&Cows.zip (3.6 KB)

Nice work @all members!
Here is my submission (just added ability to see cows after guess submission):

Notable features:

  • Ability to see guess progress (how many cows and bulls were hit as well at what positions!).
  • Ability to choose a difficulty.
  • Ability to add word lists via text file.
  • And that’s all!

Screen shots of play through:


Note: In the second screenshot it says “formidable is not the correct length” that is because I had hit the up arrow when entering the word and the guess was submitted along with the character for the up arrow which in this case comes up as invisible.

Note: I had started the course a while back but took a hiatus so the game might not match all latest requirements/suggestions for the game. Cheers!

Privacy & Terms