codebreaker_karolina 0.1.7 → 0.1.8

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: 7e440de80b751f3633dd4616e59d30ff1b11b340825e049bd02ba61e6fc0f902
4
- data.tar.gz: 1b5bd67e620806b872373eba4c0220c25774c30fdbee8ac78aa89651e549d319
3
+ metadata.gz: 4f2123ff89ac085c2aa4bd9ad405de0ccec2b5a177c9f16efac913fef78aa753
4
+ data.tar.gz: c23125068be503263c22a5b6a59785c619a263048db69532a932426994122091
5
5
  SHA512:
6
- metadata.gz: 5ac23599134384455b606a6d5682b6003061950a22f31b2b3c31ef59e04f45b744e3316790cdb341c17dcbf12917d4d8121c0d51ef857c09b6551bb51710ab97
7
- data.tar.gz: 462ea30047e9af6ee6306a708cc9c50e4213fec6d89d8483d18dc07c32bdbeffa58069549bfa209fa5ddfb54649f4a4463abd3833d445c4440906f53f4bb6892
6
+ metadata.gz: 8ef256a67685388fcbb14385c76d7658374c88dd3733d0cfeea818568ec0a7bbefcec3fee93b26465135a8caf559fc28b51d0fa0e9609498f27ae87cfc0b4cb8
7
+ data.tar.gz: ccc12cf943decc7cb4b5a1b22ffb61a84944b14cda75e9123f0155783d9aab0ff515771abd43e9993d54b46720b669e3b4ae1a29e9819a533fd4e412d0f39c0b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- codebreaker_karolina (0.1.7)
4
+ codebreaker_karolina (0.1.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module CodebreakerKarolina
2
- VERSION = '0.1.7'.freeze
2
+ VERSION = '0.1.8'.freeze
3
3
  end
data/lib/modules/game.rb CHANGED
@@ -13,8 +13,6 @@ module CodebreakerKarolina
13
13
  end
14
14
 
15
15
  def compare_code(guess)
16
- return unless valid_code?(guess)
17
-
18
16
  comparison_result(@secret_code.chars, guess.chars)
19
17
  end
20
18
 
@@ -38,12 +36,12 @@ module CodebreakerKarolina
38
36
  @hint.shuffle!.pop
39
37
  end
40
38
 
41
- private
42
-
43
39
  def valid_code?(code)
44
40
  !!code[/\A[1-6]{4}\z/]
45
41
  end
46
42
 
43
+ private
44
+
47
45
  def generate_code
48
46
  Array.new(CODE_SIZE) { rand(NUM_RANGE) }.join
49
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebreaker_karolina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - drkarolina