Here is my version of Bulls and Cows: https://github.com/padawin/udemy-bull-and-cow/releases/tag/lesson40
I brought some changes (not using an isogram for example) and used slightly different coding standards.
Feel free to comment
Here is my version of Bulls and Cows: https://github.com/padawin/udemy-bull-and-cow/releases/tag/lesson40
I brought some changes (not using an isogram for example) and used slightly different coding standards.
Feel free to comment
Hi padawin!
Nice game. However dropping the requirement that the word needs to be an isogram is a bit tricky… Not only does it become in principle much more difficult for the player to guess, but handling the scoring logic, or even deciding how to score the guess is not easy.
To see what I mean, try setting your hidden word to, let’s say, “baa”, then guess “axx”…
Hi Itizir,
Thanks for your feedback! Indeed that is a case I missed… I modified it to use only isograms, it also makes it simpler in term of code.
Yup, there’s a reason why it was designed in this way…