codeguessing 0.4.6 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/codeguessing/game.rb +10 -10
- data/lib/codeguessing/scores.yml +0 -29
- data/lib/codeguessing/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdb73f37131b8cd50536d78cac22eb3180aa275a
|
4
|
+
data.tar.gz: c4a57d540086f104b268bfd6d7ba142c788f83da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7775efbd75798a2927612bd3200675f06393f63509cefbac1e9c5ad6116a8b931ef42285171a455758b1bb004fc35020dee40eb4642d7edec7822412e2d79f51
|
7
|
+
data.tar.gz: a2c917a5c3da915119dc583ea3d7f95b359e82e2b33d8e33aa11a980398d1507fa1b6203d9eec62ce913456f328fbf7f10e19ef9a2327eb826573fdca31570fe
|
data/lib/codeguessing/game.rb
CHANGED
@@ -75,6 +75,15 @@ module Codeguessing
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
+
def cur_game
|
79
|
+
hash = {}
|
80
|
+
self.instance_variables.each do |k, v|
|
81
|
+
new_k = k.to_s.gsub('@','').to_sym
|
82
|
+
hash[new_k] = self.instance_variable_get(k)
|
83
|
+
end
|
84
|
+
hash
|
85
|
+
end
|
86
|
+
|
78
87
|
private
|
79
88
|
|
80
89
|
def check?(varible)
|
@@ -85,16 +94,7 @@ module Codeguessing
|
|
85
94
|
def random
|
86
95
|
code = ''
|
87
96
|
MAX_SIZE.times { code += rand(1..6).to_s }
|
88
|
-
code
|
89
|
-
end
|
90
|
-
|
91
|
-
def cur_game
|
92
|
-
hash = {}
|
93
|
-
self.instance_variables.each do |k, v|
|
94
|
-
new_k = k.to_s.gsub('@','').to_sym
|
95
|
-
hash[new_k] = self.instance_variable_get(k)
|
96
|
-
end
|
97
|
-
hash
|
97
|
+
code
|
98
98
|
end
|
99
99
|
|
100
100
|
end
|
data/lib/codeguessing/scores.yml
CHANGED
@@ -1,33 +1,4 @@
|
|
1
1
|
---
|
2
|
-
- :secret_code: '2222'
|
3
|
-
:attempts: 5
|
4
|
-
:hint_count: 2
|
5
|
-
:name: Yaroslav
|
6
|
-
- :secret_code: '1222'
|
7
|
-
:attempts: 3
|
8
|
-
:hint_count: 1
|
9
|
-
:name: 'Yaroslav
|
10
|
-
|
11
|
-
'
|
12
|
-
- :secret_code: '1351'
|
13
|
-
:attempts: 1
|
14
|
-
:hint_count: 0
|
15
|
-
:name: 'Yaroslav
|
16
|
-
|
17
|
-
'
|
18
|
-
- :secret_code: '1111'
|
19
|
-
:attempts: 4
|
20
|
-
:hint_count: 0
|
21
|
-
:name: Ivan
|
22
|
-
- :secret_code: '1433'
|
23
|
-
:attempts: 0
|
24
|
-
:hint_count: 0
|
25
|
-
:name: Yaroslavvvvvv
|
26
|
-
- :secret_code: '6416'
|
27
|
-
:attempts: 3
|
28
|
-
:hint_count: 2
|
29
|
-
:name: sdfsfaf
|
30
|
-
:date: 2016-11-06 16:41:58.818125270 +02:00
|
31
2
|
- :secret_code: '4336'
|
32
3
|
:attempts: 3
|
33
4
|
:hint_count: 2
|
data/lib/codeguessing/version.rb
CHANGED