I guess if that works then its okay for now its just you can do the same thing with fewer and cleaner lines of code I think. For this kind of program that doesn’t consist of many lines or have performance constraints if it works I guess its fine. I am just following along with the class too and clearly not a professional. The way the class does it you can have 6 easy to read lines of code that do the same thing if you format it nice.
Then you have the declaration above the main function and the PrintGameSummary(); before the return in the PlayGame function which gives you the 6 total lines.
I was trying things out, having fun learning how to use different features of the language and challenging myself as i went through section 2. I believe this particular one i use enum type for checking the bull and cows instead of bool, i challenged myself to see if i could figure it out before watching the lecture and then just kept it in my program as i went through. Just going through the course and following along doesn’t teach me everything, so i found this to be a constructive way to learn as well.
So im fully aware my code is not perfect. Its neat that you can have a look at it and see how non practical it is. My only goal here is to learn.
Yeah that’s great. It was a creative and different approach to the challenge, and I totally agree that it helps to learn the material by doing that. It’s also great that you got it up and running with the different approach too. I just thought id respond to say my two cents and to make me a little more engaged and consistent with the course
Great job on making your own version of the game summary. I was actually wondering if we were going to get to the point where we are writing a word generator to pick a random word at the start of the game as I’m interested to know how they do such stuff especially since i’m fairly new to coding. My only idea on how a word generator would work is by creating a dictionary of words which would look like an array filled with a bunch of words you like to use and then (and here is the gray area I don’t know about) there would be some way to call the array and randomly pick a word from it. Hope you guys have a great day.