Throughout the coding process, one main problem that kept coming up was the logic for evaluating guesses. The rest of the program was very simple to make. Problems kept coming up with bizarre results when testing. To test the logic I would try all sorts of inputs that should return specific numbers of white and black pegs. I made a chart similar to a Karnaugh Map with the correct number of black pegs on one side and the correct number of white pegs on the other side. I wrote the number I ended up getting in the box where they lined up. This tool proved invaluable to assessing the success of my program and was instrumental to the solution to the problem. Interestingly, the solution that ended up working was the same as from a previous implementation (that didn’t work), but something else must have been changed elsewhere in the program that made it work.
The progression of the code started with the basics: for loop, asking for inputs, the easy stuff. Somewhere in the middle of the easy stuff was the first attempt at the guessing logic. This proved quite difficult and so I came back to it and various times throughout the development. Nothing turned out to be problematic other than the logic for guessing, which didn’t come through until the very end.