-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Pseudocode
I think you did a great job with your pseudocode because you clearly express what you will be coding that is easy to understand.
Naming
You did an excellent job with the naming of your variables. Each instance variable easily identifies what it is doing.
Overall Solution
I think that overall your solutions still needs some work. For instance, with your current setup you will have to instantiate a new guessing game each time. Also, you wrote the solved? method that you never use. Find a way to incorporate that into your driver code. You can also review how to write one line if/else statements to refactor the solve? method into one line. In your guess method, you use an if/elsif/elsif statement, why not just convert the last elsif into an else statement? You have really cover all the other possibilities with your if/elsif statement.
Driver test code
I would have liked to have seen some driver code for your solved? method. How can you be sure it works without writing a test for it? It may seem trivial, but it is a good practice to write tests for all your methods.
Reflection
I liked how you decided to take initiative and seek out the differences between strings and symbols and why you would use one over the other. I also liked you you thought about using a case statement and then decided that it may not have been the best choice for this exercise. Make sure to keep pushing yourself to further your learning.