codebreaker_Bavykin 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/codebreaker/game.rb +3 -3
- data/lib/codebreaker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d37519f30032a17022d7b40d6eb4305dd9d8c3f2
|
4
|
+
data.tar.gz: 6d5cb617d5b18aa2cc29889e16be0775a46c5bca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a448e5199ab50e027f2454679d18c3fede2e47535b572154c5730e5575212b95f0913224097ba0d8c2235418b6c9fe633996a0bdfb418c43b43829e172519b77
|
7
|
+
data.tar.gz: 3234c22c3ce9eaad273c9fa57ccdd1cbac627d39336c07fc8b45cfe5ffd0ced2621b730ab790940cc284b6851214baafa2c165f67e363af286cd0249658bc1af
|
data/lib/codebreaker/game.rb
CHANGED
@@ -19,9 +19,9 @@ module Codebreaker
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.generate_game_data(difficulty = :easy)
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
{ secret_code: Array.new(4) { rand(1..6) },
|
23
|
+
attempts: DIFFICULTIES.dig(difficulty, :attempts),
|
24
|
+
hints: secret_code.shuffle.take(DIFFICULTIES.dig(difficulty, :hints)) }
|
25
25
|
end
|
26
26
|
|
27
27
|
def handle_guess(user_answer)
|
data/lib/codebreaker/version.rb
CHANGED