Skip to content

Word Guess Game - Pacman#6

Open
yordanosd wants to merge 13 commits intoAda-C5:masterfrom
nlcurry:master
Open

Word Guess Game - Pacman#6
yordanosd wants to merge 13 commits intoAda-C5:masterfrom
nlcurry:master

Conversation

@yordanosd
Copy link
Copy Markdown

Nadine Curry and Yordanos Dirar worked on this project.

Depends on colorize gem.

Have fun ^_^

nlcurry and others added 13 commits February 25, 2016 13:24
…t the image according to how many wrong guesses there are
… starts the game. Game over method checks if user is out of guesses.
…_word_array and @game_word_array from guess method to word_gen. In the image method, we added the .join() method to game_word_array.
…nimals and diffucult by using arrays. word list is a hash with the values for each theme.
…e# variables to add space in image depending on word length and guessed letters for aesthetics.
@yordanosd yordanosd closed this Feb 29, 2016
@yordanosd yordanosd reopened this Feb 29, 2016
Comment thread word_guess.rb
require "colorize"

class Word_guess
attr_accessor :wrong_count, :word_list, :secret_word, :game_word, :game_word_array
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

attr_accessor can be pretty dangerous. Are you sure you want me to be able to access secret_word when I'm playing your game? Or to be able to change secret_word from outside the class? You only need getter/setter methods when things (methods, other classes, users) need access to instance variables from outside the class. What would happen if you deleted this line completely? Would anything break?

@word_list, for example, is used three times in your program, none of which involve exposing the value to something/someone outside the object. Something to keep in mind in the future.

@jnf
Copy link
Copy Markdown

jnf commented Mar 1, 2016

Hi! ^_^

Great job on this project! I've let a few comments for you to review, but, overall, everything looks great. Your code is very organized and expressive. You've solved problems in creative ways, and leveraged the collective knowledge of the internet to great effect. Keep it up!

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.

3 participants