lib/app/entities/console.rb in codebreaker_ruban-0.3.4 vs lib/app/entities/console.rb in codebreaker_ruban-0.3.5
- old
+ new
@@ -56,13 +56,13 @@
def choice_difficulty
Message.choice_difficulty(EASY_STRING, MEDIUM_STRING, HELL_STRING)
process_user_input do |input|
@difficulty = case input
- when EASY_STRING then Game::EASY
- when MEDIUM_STRING then Game::MEDIUM
- when HELL_STRING then Game::HELL
- end
+ when EASY_STRING then Game::DIFFICULTY[:easy]
+ when MEDIUM_STRING then Game::DIFFICULTY[:medium]
+ when HELL_STRING then Game::DIFFICULTY[:hell]
+ end
return Message.error_difficulty unless @difficulty
set_state(:start_game)
end
end