We began this proyect like two weeks ago, maybe less, so we had to focus on it these last days. We spended around 3 hours every day (I’m not kidding), to make it work. This was not an easy task, not as easy as a simple WSQ or masteries, this was a long code compare to those, and debugging it was a pain in the neck. You make one wrong move, the compiler tells you everything is alright and you continue the code with that error until you run it and it doesn’t do what you want. Then, to find that error, you might spend a couple of hours until surrender (or until you ask Ken).
Yep, that happened to me, I commited one (I redefined an int variable to a bool one) but the compiler still told me the code was OK. Also, I thought I had copied a vector to make an original board but what I did was to point both vectors to the same object, so, whenever I tried to modify the board, it returned its values to the original ones. That was such a shame, I was looking everywhere in the code, but there, in that “copied vector”.
Aside that, I had a really great experience working in the code, I learned a lot of new things and I’ve begun to like more programming. It takes a lot of logical thought to make things work, it obligates your brain to think of all the options you have and then choose the simplest one. The thing is that there’s not a unique way to achieve something, all the codes are different, C++ is a real language and everyone has its own style to speak it. In summary, programming is awesome.
Lastly, this was our process:
Part 1: Board’s aesthetics.
Part 2: Creation of functions to check Original values, Row and Column
Part 3: Make program easy to follow (implementation of colors and printing of responses)
Part 4 (the easiest one): Let the user erase numbers
Part 5: Creation of function to let know the user has won and create option of Restore (erase progress)
Part 6: More aesthetics.
Last part: Creation of function to check Quadrant and Validated user input (user can only introduce numbers between 1 and 9)
Here’s the link to the code, enjoy it:
https:/