You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I don't understand why my program passes this test ?
Instead of "a---a-", my method returns "------" as I checked with byebug. Also, my post /guess is still empty!
post'/guess'doletter=params[:guess].to_s[0]### YOUR CODE HERE ###flash[:message]="You have already used that letter."if not @game.word.include?(letter)redirect'/show'end
GivenIstartanewgamewithword"animal"# features/step_definitions/game_steps.rb:12[47,56]in/home/user/edx/agile_dev_basics/hw-sinatra-saas-hangperson/lib/hangperson_game.rb# def word_with_guesses47: dashed_word=@word.clone48: dashed_word.each_chardo |l|
49: dashed_word.gsub!l,"-"if not guesses.include?(l)50: end51: byebug=>52: dashed_word53: end54:
55: defcheck_win_or_lose56: return:winif not word_with_guesses.include?("-")(byebug) "------"(byebug) When I guess "a" # features/step_definitions/game_steps.rb:19 Then I should see "a---a-" within "span.word" # features/step_definitions/game_steps.rb:71
Kind regards.
The text was updated successfully, but these errors were encountered:
Hello
I don't understand why my program passes this test ?
Instead of "a---a-", my method returns "------" as I checked with byebug. Also, my
post /guess
is still empty!Kind regards.
The text was updated successfully, but these errors were encountered: