codebreaker_ruban 0.3.6 → 0.3.7

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: fe85b00a1d8e13ae5003c95705ac2c44d85a7bdcf9fab60dd15bfe2c48a5d7ad
4
- data.tar.gz: b7ce1ebccc98c0aaf4b448f75249c79a88321a4947a40335fc8cb0385170cebe
3
+ metadata.gz: c870cda099e3608be64a9ec4028728f10e7e4208020f39fe315f0b2617265e0f
4
+ data.tar.gz: 0e7515721bf17cda5b5b3cb616c0ceacd4f9cf1a1a7a0dd06679924cc24c053a
5
5
  SHA512:
6
- metadata.gz: b92d9c0535e7558148f6b32dc503fd5896d67f9a0765caf287d817af962d9806190b7fc94155b76d26d53726143cc57979f68e5a04342fa197b2a9227559b91f
7
- data.tar.gz: ca27e34cdfc9e1b3a1918e50bc99b977394efb0eecdfc8e672e81828f57d20d4671f703df88519f03be91957fac73d429a8a79a5bfab8fdadc7ff621bc260fee
6
+ metadata.gz: 616a9bef41a1896472ab9ca5394ef5ba43af97636b78d434fd3a0608efcecf3bc95602a2bd77a24be803c27a60aec63684e4c0a25a28930d85319018b26facdc
7
+ data.tar.gz: ff31ecf608a160dd6880335abeb4dd3b41f757ed72f30e404d3fc24c7e451f7c9e06151dcca5f1a9bf99128632ec9afeb3d5e5cebd35fff788409749bca46ac1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- codebreaker_ruban (0.3.6)
4
+ codebreaker_ruban (0.3.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -3,7 +3,7 @@
3
3
  module CodebreakerRuban
4
4
  class Game
5
5
  include Validation
6
- attr_reader :difficulty, :attempts_total, :hints_total, :user, :secret_code, :datetime
6
+ attr_reader :difficulty, :attempts_total, :hints_total, :user, :hints_showeded, :secret_code, :datetime
7
7
  attr_accessor :attempts_used, :hints_used, :errors, :guess_code
8
8
 
9
9
  LENGTH_GUESS = 4
@@ -16,7 +16,6 @@ module CodebreakerRuban
16
16
 
17
17
  def initialize(difficulty, user)
18
18
  @user = user
19
- binding.pry
20
19
  @difficulty = difficulty[:difficulty]
21
20
  @secret_code = generator_secret_code
22
21
  @attempts_total = difficulty[:attempts_total]
@@ -24,6 +23,7 @@ module CodebreakerRuban
24
23
  @hint = secret_code.clone.shuffle
25
24
  @hints_used = 0
26
25
  @attempts_used = 0
26
+ @hints_showed = []
27
27
  @datetime = Time.now
28
28
  @guess_code = nil
29
29
  @errors = []
@@ -53,7 +53,7 @@ module CodebreakerRuban
53
53
  def hint_use
54
54
  if @hints_used < @hints_total
55
55
  @hints_used += 1
56
- @hint.pop
56
+ @hints_showed << @hint.pop
57
57
  else
58
58
  clear_errors
59
59
  errors << Message.error_guess_code
@@ -1,3 +1,3 @@
1
1
  module CodebreakerRuban
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebreaker_ruban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - IRuban