Skip to content

Jessica & Lauren --Carets#16

Open
enigmagnetic wants to merge 16 commits intoAda-C8:masterfrom
enigmagnetic:master
Open

Jessica & Lauren --Carets#16
enigmagnetic wants to merge 16 commits intoAda-C8:masterfrom
enigmagnetic:master

Conversation

@enigmagnetic
Copy link

Word Guess

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
How do you feel you and your partner did in sharing responsibilities? Yes
Describe an instance where you used a method for something to encapsulate the functionality within your class. What does it do? What are its inputs and outputs? We defined the play method within the Game class. It drives all of the user interaction with the game, provides prompts and retrieves the updated art. The inputs are the user's guesses, the outputs are the art and word display, a new Guess object, the end of the game, or it refers back to itself.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? We used the array char_positions as a local variable within the update_display method, because we want the array to be reset each time it is called.
What code, if any, did you feel like you were duplicating more than necessary? We refactored our code to move Guess from a method within Game to its own class, and were able to reduce repetitive code. The code we have is long, but DRY.
Is there a specific piece of code you'd like feedback on? Why do we have to define the arrays of words (that we use as dictionaries for the game) within the Game class? Why can't the Game class access them if they're local variables in the executable program?

@CheezItMan
Copy link

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. Check, well done. Nice number of commits. I like how you started using initial, that might be a good idea to mark who made the commits.
Readable code with consistent indentation. I like how you broke up the code into the three classes. The Guess, Display and Guess classes look pretty well designed. Well done!
Answered comprehension questions Check, The game class can't access local variables in the main program because they're outside the scope of it's methods.
Product Functionalities
Created a Class to encapsulate game functionality. Three classes, very well designed.
Used methods to DRY up your code. Check
Created instance variables & local variables where appropriate. Check
Used Arrays to store lists of letters guessed. Check, well done
Used variables & random numbers to allow the game to function with multiple words, no hard-coded answers. Check
Programmed "defensively" to detect errors in user input. Check, good use of until loops
Summary The @level method doesn't need to be an instance variable as it's only used in the initialize method. I would also suggest not running play immediately upon creating a Game object, just to allow a user of a Game to decide when to play the game. You hit all the requirements and created a nice Word guess game. Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants