submit HW 2 - secret number

oh yes,

> +def check_guess(n, secret_number, remaining)

> + remaining -= 1

remaining is a local variable, avoid passing too many variables into an
array
calculation of  remaining should be outside of the check_guess method

On Sun, Nov 9, 2014 at 11:48 AM, Hubert Lee <notifications@github.com>
wrote:

> In wilsonlam/secret_number_game.rb:
>
> > +# Remember to cast input from the Player into the appropriate data type.
> > +#
> > +###############################################################################
> > +
> > +
> > +
> > +index = 0
> > +remaining = 0
> > +secret_number = 8
> > +
> > +def get_input
> > +	gets.chomp
> > +end
> > +
> > +def check_guess(n, secret_number, remaining)
> > +	remaining -= 1
>
> Think about what the scope of remaining is here. It is a local variable,
> it's value will never be passed out of this function. Is it useful to
> decrement its value here?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ga-students/BEWD_2_HK/pull/12/files#r20056417>.
>