I ran into a few problems that added a lot of difficulty:
-
Code::parse
It was possible to pass a string into Code.new(pegs) instead of an array and still pass the spec. When I finally got to Code#, this led to a lot of confusion. -
Game#get_guess
I needed $stdin to use my gets method. The solution didn’t seem to require it, and the problem seemed to be with my computer instead of the specs. Perhaps note for others who might run into the same issue? -
Game::display_matches
The answered required me to print strings that had either “exact” or “near” at least once, which meant that using “Exact” and “Near” did not work. For an exercise that is meant to practice using objects, this extra requirement seemed a bit out of place. To be fair, the spec expect($stdout.string).to match(/exact/) was there, but due to the very brief discussion of #stdout / $stdin and /exact/ in the I/O curriculum, and the very few exercises that practiced them, it was ver difficult to understand what was wanted of me.