learn-japanese 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 164745bdc76d66bff134ec0e06fb5fceef44fb480f9c266c32beb6342dfe252b
4
- data.tar.gz: 9bea86b40b59102cad35e1749fc379e6c14b2384b9f6f6f4b0abcd29409c446b
3
+ metadata.gz: b9551ba5848ab1baac33056aea1f97eaeba4057bf3de1c2cace4fe48b871e28d
4
+ data.tar.gz: 4101529e9a6874489cc7001d5eccf4b83691cabdd0db6c057ce32fc92373c805
5
5
  SHA512:
6
- metadata.gz: a0b5cf252d1a7eefb8b3953a7285bb7a6ec99b1059c284f7f934ca7813307ba37f9297423a77498277750b1a6da17745bb1c200f7067607a45884c70edb9bb17
7
- data.tar.gz: 37b4068955aa70702a166265a2e9482e9141da5404251f0888a1f2bce44337b9970f70edafd0adc5cf81d20574d2431533e795a9e158ca737d5f440645b7dec8
6
+ metadata.gz: 71d59ed075201be14f7f46d69e0d1ffe98d45f46c36b96cc62f56619198c00b8c35b22a398e414b60d789cc4ed475ddf3099ade875050f185e08bb324a99b917
7
+ data.tar.gz: c81f8b3190ed01932c2f9483d87ebecdf9026df68c8b770631c735e89033ad6d2e89e3e30aa42b1144658beb30e1ef15ad071167592e2ad09c82e430131e80fa
@@ -11,13 +11,13 @@ class CLI < Thor
11
11
  end
12
12
 
13
13
  map ['ca', '-ca', '--choose-answer', 'choose-answer'] => 'choose_answer'
14
- desc 'choose-answer [LEVEL]', 'LEVEL = 1-4'
14
+ desc 'choose-answer [LEVEL]', 'LEVEL = 1-6'
15
15
  def choose_answer(level)
16
16
  LearnJapanese.choose_answer(level.to_i)
17
17
  end
18
18
 
19
19
  map ['sa', '-sa', '--short-answer', 'short-answer'] => 'short_answer'
20
- desc 'short-answer [LEVEL]', 'LEVEL = 1-4'
20
+ desc 'short-answer [LEVEL]', 'LEVEL = 1-6'
21
21
  def short_answer(level)
22
22
  LearnJapanese.short_answer(level.to_i)
23
23
  end
@@ -34,17 +34,37 @@ class Hiragana
34
34
  def self.group4
35
35
  { ta: "\u{305F}",
36
36
  chi: "\u{3061}",
37
- tsu: "\u{3064}",
37
+ tsu: "\u{3064}", # つ
38
38
  te: "\u{3066}",
39
39
  to: "\u{3068}"
40
40
  }
41
41
  end
42
42
 
43
+ def self.group5
44
+ { na: "\u{306A}",
45
+ ni: "\u{306B}",
46
+ nu: "\u{306C}",
47
+ ne: "\u{306D}",
48
+ no: "\u{306E}"
49
+ }
50
+ end
51
+
52
+ def self.group6
53
+ { ha: "\u{306F}",
54
+ hi: "\u{3072}",
55
+ hu: "\u{3075}",
56
+ he: "\u{3078}",
57
+ ho: "\u{307B}"
58
+ }
59
+ end
60
+
43
61
  def self.all
44
62
  output = self.group1
45
63
  output.merge!(self.group2)
46
64
  output.merge!(self.group3)
47
65
  output.merge!(self.group4)
66
+ output.merge!(self.group5)
67
+ output.merge!(self.group6)
48
68
  output
49
69
  end
50
70
 
@@ -55,6 +75,8 @@ class Hiragana
55
75
  hiragana.merge! Hiragana.group2 if levels.include? 2
56
76
  hiragana.merge! Hiragana.group3 if levels.include? 3
57
77
  hiragana.merge! Hiragana.group4 if levels.include? 4
78
+ hiragana.merge! Hiragana.group4 if levels.include? 5
79
+ hiragana.merge! Hiragana.group4 if levels.include? 6
58
80
  hiragana
59
81
  end
60
82
 
@@ -86,5 +108,8 @@ class Hiragana
86
108
  Debug.puts_group Hiragana.group2 if level > 1
87
109
  Debug.puts_group Hiragana.group3 if level > 2
88
110
  Debug.puts_group Hiragana.group4 if level > 3
111
+ Debug.puts_group Hiragana.group5 if level > 4
112
+ Debug.puts_group Hiragana.group6 if level > 5
113
+ Debug.puts_group Hiragana.group7 if level > 6
89
114
  end
90
115
  end
@@ -10,10 +10,15 @@ class ChooseAnswerGame
10
10
  @score = 1
11
11
  @max_score = max
12
12
 
13
- @silabario = Hiragana.group1
14
- @silabario.merge! Hiragana.group2 if @level > 1
15
- @silabario.merge! Hiragana.group3 if @level > 2
16
- @silabario.merge! Hiragana.group4 if @level > 3
13
+ #@silabario = Hiragana.group1
14
+ #@silabario.merge! Hiragana.group2 if @level > 1
15
+ #@silabario.merge! Hiragana.group3 if @level > 2
16
+ #@silabario.merge! Hiragana.group4 if @level > 3
17
+ #@silabario.merge! Hiragana.group4 if @level > 4
18
+ #@silabario.merge! Hiragana.group5 if @level > 5
19
+ #@silabario.merge! Hiragana.group6 if @level > 6
20
+ levels = (1..@level).to_a
21
+ @silabario = Hiragana.groups(levels)
17
22
 
18
23
  @keys = @silabario.keys
19
24
  end
@@ -14,6 +14,8 @@ class ShortAnswerGame
14
14
  @silabario.merge! Hiragana.group2 if @level > 1
15
15
  @silabario.merge! Hiragana.group3 if @level > 2
16
16
  @silabario.merge! Hiragana.group4 if @level > 3
17
+ @silabario.merge! Hiragana.group5 if @level > 4
18
+ @silabario.merge! Hiragana.group6 if @level > 5
17
19
 
18
20
  @keys = @silabario.keys
19
21
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  module LearnJapanese
3
- VERSION = '0.7.0'
3
+ VERSION = '0.8.0'
4
4
  NAME = 'learn-japanese'
5
5
  HOMEPAGE = 'https://github.com/dvarrui/learn-japanese'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learn-japanese
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-28 00:00:00.000000000 Z
11
+ date: 2022-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize