codeguessing 0.4.5 → 0.4.6

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: 61b21ffaab19a1a63dcb02b74ae830577b491f19
4
- data.tar.gz: 06fbebd32d6c8d8cc650fe6a5a10b6aa97f2ce77
3
+ metadata.gz: eace537f8a1bc10de61c91f95d5ca80d15d0f903
4
+ data.tar.gz: 8ab841471e4b0a56ef3d911f34d89102905d1c5c
5
5
  SHA512:
6
- metadata.gz: 96063313e8e199857583e99e07bdfc69849648a156c44e12281364b642e19cee3b6dff54d6f8d7f8cc497994e765451da7d62ed058c330755ba6e73fd7691ec2
7
- data.tar.gz: a87df9cec2e9f84de0535190c2ca1cb37046b5b055990c64ca97f3d836971d85e8faab851c4f66539187c5483af29f7a53bdb16da5ee8d73cb5f4714d757649b
6
+ metadata.gz: 78f0b1b6a685d5d2f629910673444d5ec2fd89db56be2c26a13bd1929f76ece23914d6374b50121e4659ad6418de6042dca576f22bc6d8742c67fb31c5051c53
7
+ data.tar.gz: d88dd69659c158812a115880a3114cdaae044f08478542b4746472dc71d00692a5b1191d4097ec070dfc30c209ddbd6a484350e50287cb6cf10b982f26995151
@@ -16,8 +16,8 @@ module Codeguessing
16
16
  @game = Game.new(opt)
17
17
  end
18
18
 
19
- def go(knowed = false)
20
- rules unless knowed
19
+ def go(knowed = true)
20
+ rules if knowed
21
21
  puts "Attempt(s): #{@game.attempts} | Hint(s): #{@game.hint_count}"
22
22
  case @game.win?
23
23
  when true
@@ -97,7 +97,7 @@ module Codeguessing
97
97
  puts 'Do you want start again? (Y/N)'
98
98
  if confirm?
99
99
  @game = Game.new
100
- return go(true)
100
+ return go(false)
101
101
  else
102
102
  puts '-----------Scores----------'
103
103
  p @scores
@@ -49,6 +49,8 @@ module Codeguessing
49
49
  def cur_score(name = 'Anonim')
50
50
  hash = cur_game
51
51
  hash[:name] = name
52
+ hash[:attempts] = MAX_SIZE - attempts
53
+ hash[:hint_count] = MAX_HINT - hint_count
52
54
  hash[:date] = Time.now.to_i
53
55
  hash
54
56
  end
@@ -28,3 +28,10 @@
28
28
  :hint_count: 2
29
29
  :name: sdfsfaf
30
30
  :date: 2016-11-06 16:41:58.818125270 +02:00
31
+ - :secret_code: '4336'
32
+ :attempts: 3
33
+ :hint_count: 2
34
+ :state: win
35
+ :answer: "++++"
36
+ :name: YaroslavBIG
37
+ :date: 1478811836
@@ -1,3 +1,3 @@
1
1
  module Codeguessing
2
- VERSION = "0.4.5"
2
+ VERSION = "0.4.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeguessing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - bezrukavyi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-09 00:00:00.000000000 Z
11
+ date: 2016-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize