Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kimberley M & Isabel S - Carets #17

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

kimberleyamackenzie
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? We worked well together, and shared the responsibilities of both concept and execution equally throughout the project.
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? The guess method inside our Game class encapsulates nearly everything that happens when a user enters a guess: prompting if a non-letter guess is entered, prompting if a letter is entered that has already been guessed, determining if a guess triggers winning the game, revealing the updated word with guessed letters and blanks, appropriately reprinting or decomposing the image, storing the guessed letters, and adding turns if a losing guess is entered. It's inputs are solely the user's guessed letter, and it outputs the bank of already guessed letters, the word as it is currently guessed/blanked, and the decomposed image.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? Inside the ascii art method, we used a local variable so we could read in from a file & output only portions of that file by line number, which we didn't think would be as simple with an instance variable.
What code, if any, did you feel like you were duplicating more than necessary? We feel like our code doesn't have too much unnecessary duplication.
Is there a specific piece of code you'd like feedback on? Nothing in specific!

@tildeee
Copy link

tildeee commented Aug 28, 2017

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. x
Readable code with consistent indentation. x
Answered comprehension questions x
Product Functionalities
Created a Class to encapsulate game functionality. x
Used methods to DRY up your code. x
Created instance variables & local variables where appropriate. x
Used Arrays to store lists of letters guessed. x
Used variables & random numbers to allow the game to function with multiple words, no hard-coded answers. x
Programmed "defensively" to detect errors in user input. x


# Ascii Art Methods
def ascii
file = File.open("/Users/kimberley/Desktop/asciiartfile.txt", "r")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can place a relative path to this file with just file = File.open("asciiartfile.txt", "r") and it assumes that the file is in the same directory as this (word-guess.rb). Same as line 154

@tildeee
Copy link

tildeee commented Aug 28, 2017

Overall great code! You two did interesting things, like using the various gems and opening a file. Good job

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