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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 574f75947893255bd54c4b561c1e57e7d1edcba9
4
- data.tar.gz: e3b9547acc9888807dbc7871cf059275f9f71e79
3
+ metadata.gz: b73ba28541cac0534a2bcdd85d3b15b1b3712afa
4
+ data.tar.gz: dfec30618fd677e5d9ea922725a98865d4ea096e
5
5
  SHA512:
6
- metadata.gz: ce22c3389cb27a5944303264989720bb58a229d5c5823c6d9fd95ebdb2151feb8810980c089c26be737a0482ca4cb7c14ee5c02939de23bfd92ae3986d0109f0
7
- data.tar.gz: 4bd4d1b3aeb965f10803273047a092a74f02ce7d4157551ee90f80c7d3d8831df45a3c9e1111fef8c1c5970b7b8411adb1e696afa05f4641c3d1e0ba5971fd47
6
+ metadata.gz: fb5eb1df6f6571a6a4ee1698a4a2ecfb07bb55159becd5d69327b93dcc58daa2a8de41e434da8e6c6ab1c6c6d2ef48f79ee23cad6e2ffd3d7d7218dfb5ea47fa
7
+ data.tar.gz: f06d8ce95ff79033aaf0bc66a547b1e883321b0734136f6a922ec1feafc23b9f891af6c5eec5622129a707528029c3a5426d7a81e83137be1f150e88fcc57183
@@ -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: 'Anonim', path: @path)
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)
@@ -0,0 +1,8 @@
1
+ ---
2
+ - :secret_code: '1116'
3
+ :attempts: 4
4
+ :hint_count: 2
5
+ :state: win
6
+ :answer: "++++"
7
+ :name: Yaroslav
8
+ :date: 1481060373
@@ -85,7 +85,7 @@ module Codeguessing
85
85
  private
86
86
 
87
87
  def natural?(number)
88
- number >= 0
88
+ number <= 0 ? false : true
89
89
  end
90
90
 
91
91
  def random
@@ -1,3 +1,3 @@
1
1
  module Codeguessing
2
- VERSION = "0.5"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeguessing
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bezrukavyi