codeguessing 0.5 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/codeguessing/console.rb +2 -2
- data/lib/codeguessing/data/scores.yml +8 -0
- data/lib/codeguessing/game.rb +1 -1
- 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: b73ba28541cac0534a2bcdd85d3b15b1b3712afa
|
4
|
+
data.tar.gz: dfec30618fd677e5d9ea922725a98865d4ea096e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb5eb1df6f6571a6a4ee1698a4a2ecfb07bb55159becd5d69327b93dcc58daa2a8de41e434da8e6c6ab1c6c6d2ef48f79ee23cad6e2ffd3d7d7218dfb5ea47fa
|
7
|
+
data.tar.gz: f06d8ce95ff79033aaf0bc66a547b1e883321b0734136f6a922ec1feafc23b9f891af6c5eec5622129a707528029c3a5426d7a81e83137be1f150e88fcc57183
|
data/lib/codeguessing/console.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Codeguessing
|
2
2
|
class Console
|
3
|
-
attr_reader :game, :scores
|
3
|
+
attr_reader :game, :scores, :path
|
4
4
|
|
5
5
|
MESSAGE = YAML.load_file(File.join(File.dirname(__FILE__), 'data/messages.yml'))
|
6
6
|
|
@@ -50,7 +50,7 @@ module Codeguessing
|
|
50
50
|
YAML.load_file(path) if File.exist?(path)
|
51
51
|
end
|
52
52
|
|
53
|
-
def save(name
|
53
|
+
def save(name = 'Anonim')
|
54
54
|
return puts MESSAGE['cant_save'] unless game.win?
|
55
55
|
@scores << game.cur_score(name.chomp)
|
56
56
|
File.new(path, 'w') unless File.exist?(path)
|
data/lib/codeguessing/game.rb
CHANGED
data/lib/codeguessing/version.rb
CHANGED