codebreaker-ga 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/codebreaker/base_class.rb +1 -0
- data/lib/codebreaker/compare_codes.rb +0 -0
- data/lib/codebreaker/game.rb +3 -3
- data/lib/codebreaker/init_difficulties.rb +0 -0
- data/lib/codebreaker/version.rb +1 -1
- data/pec +0 -0
- data/statistic_test.yml +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 571cb5edc34dfe9123091e8786675ed4460e02624ae59ab3b538abb7216d0303
|
4
|
+
data.tar.gz: 251dfb9530f68727c53b64cdbc96444982f28c432e73997992b2b7e7be02e335
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02355ed87e5436a22d63e7dc7388762e726dd5dc045571c9c22dcc5ffbbd5ce16c038719a7ca27a2eaabe5f68c5803cf98f6365f2b9a829af894af248b86bc43
|
7
|
+
data.tar.gz: 81328f8cd2df76f85c3880c542b57ec38762e7d133f0e881926ddbaf32c3df7d9013105b53df78bc77260c99b738885ed202e3489304b723a2787b1d22c13fba
|
data/Gemfile.lock
CHANGED
File without changes
|
data/lib/codebreaker/game.rb
CHANGED
@@ -5,13 +5,14 @@ module Codebreaker
|
|
5
5
|
CODE_LENGTH = 4
|
6
6
|
CODE_NUMBERS = ('1'..'6').freeze
|
7
7
|
|
8
|
-
attr_reader :statistic, :difficulties, :difficulty, :errors
|
8
|
+
attr_reader :statistic, :difficulties, :difficulty, :errors, :game_stage
|
9
9
|
attr_accessor :user, :hint_code
|
10
10
|
|
11
11
|
def initialize
|
12
12
|
@errors = {}
|
13
13
|
@statistic = Statistic.new
|
14
14
|
@difficulties = init_difficulties
|
15
|
+
@difficulty = nil
|
15
16
|
end
|
16
17
|
|
17
18
|
def match_code_valid_length?(match_code)
|
@@ -70,7 +71,7 @@ module Codebreaker
|
|
70
71
|
end
|
71
72
|
|
72
73
|
def difficulty_valid?
|
73
|
-
return true unless @difficulty.nil?
|
74
|
+
return true unless @difficulty.nil?
|
74
75
|
|
75
76
|
@errors[:difficulty] = 'difficulty_change_error'
|
76
77
|
false
|
@@ -90,7 +91,6 @@ module Codebreaker
|
|
90
91
|
end
|
91
92
|
|
92
93
|
def validate
|
93
|
-
@errors = {}
|
94
94
|
difficulty_valid?
|
95
95
|
end
|
96
96
|
end
|
File without changes
|
data/lib/codebreaker/version.rb
CHANGED
data/pec
CHANGED
File without changes
|
data/statistic_test.yml
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codebreaker-ga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GorohovAlex
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|