BullCowGame Modifications!

Hello there, these are a few modifications I made on the BullCowGame!

The first is a simple difficulty selector. You input 1, 2 or 3 then enter to change difficulty. This feeds into the get valid words function and instead of it being ( > 4 && < 8 ) it simply adds this number onto the predetermined ‘base’ difficulty of 3!

One thing I found frustrating was not being able to see your past guesses. This next feature allows you to see a list of your past guesses (will only be useful to see the past amount that can fit on screen, a scrollbar on the terminal would rectify this but I have no idea about that yet!)

It shows the guess itself, aswell as the Bull/Cow count on the guess. I wont go into specifics, but an array is created which houses a new struct type which is made of a string as well as our BullCowCount struct, this is then fed into a function.
A little thank you to all course instructors here, I’ve never been able to get my head around concepts of programming like this before (relatively simple I’m sure), and I’ve tried on more than one occasion, but this time things are actually sticking!


I am happy the concepts are actually sticking now! I’m so happy for you!

1 Like

Privacy & Terms