Class: ShortAnswerGame
- Inherits:
-
Object
- Object
- ShortAnswerGame
- Defined in:
- lib/learn-japanese/game/short-answer-game.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(level = 1, max = 10) ⇒ ShortAnswerGame
constructor
A new instance of ShortAnswerGame.
- #run ⇒ Object
Constructor Details
#initialize(level = 1, max = 10) ⇒ ShortAnswerGame
Returns a new instance of ShortAnswerGame.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/learn-japanese/game/short-answer-game.rb', line 8 def initialize(level=1, max=10) @level = level @score = 1 @max_score = max @silabario = Hiragana.group1 @silabario.merge! Hiragana.group2 if @level > 1 @silabario.merge! Hiragana.group3 if @level > 2 @silabario.merge! Hiragana.group4 if @level > 3 @keys = @silabario.keys end |