codebreaker_marian 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/autoload.rb +0 -3
- data/lib/codebreaker_marian/entities/menu.rb +11 -5
- data/lib/codebreaker_marian/version.rb +1 -1
- metadata +2 -5
- data/database/.gitignore +0 -4
- data/lib/codebreaker_marian/i18n_config.rb +0 -4
- data/lib/codebreaker_marian/locales/en.yml +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce512550e5252b0b2e1a5c5502abca50e8317f18e081934c5c706ceb7017d93e
|
4
|
+
data.tar.gz: 0bf5374baab0a4542d2f0fc5334bbde7ee28030b4149738cbf9302a7db2f3ece
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eed90a95e74fe107ce6edbf7a1dc347d2ad22a8feaa3008bcff0d7d0e016ea1ae10502e816e10113e4a33b2c7d56df9292782be433c326f2defaae8bd1bf1c3
|
7
|
+
data.tar.gz: ac32eba08af488318a6efb50dfaad069ddf7d87f74fbab0950ebacd73046a6339b7af69b412594029eb1f2fa5d355b4d45777f15d7f8f0b01dbf87a35dda6a39
|
data/Gemfile.lock
CHANGED
data/autoload.rb
CHANGED
@@ -2,13 +2,10 @@
|
|
2
2
|
|
3
3
|
require 'i18n'
|
4
4
|
require 'yaml'
|
5
|
-
require_relative 'lib/codebreaker_marian/i18n_config'
|
6
|
-
require_relative 'lib/codebreaker_marian/modules/validator'
|
7
5
|
require_relative 'lib/codebreaker_marian/entities/game'
|
8
6
|
require_relative 'lib/codebreaker_marian/entities/game'
|
9
7
|
require_relative 'lib/codebreaker_marian/entities/data_storage'
|
10
8
|
require_relative 'lib/codebreaker_marian/entities/processor'
|
11
9
|
require_relative 'lib/codebreaker_marian/entities/menu'
|
12
|
-
require_relative 'lib/codebreaker_marian/entities/renderer'
|
13
10
|
require_relative 'lib/codebreaker_marian/entities/statistics'
|
14
11
|
require_relative 'lib/codebreaker_marian/version'
|
@@ -3,9 +3,9 @@
|
|
3
3
|
module Codebreaker
|
4
4
|
module Entities
|
5
5
|
class Menu
|
6
|
-
include Modules::Validator
|
7
|
-
attr_reader :storage, :renderer, :game, :guess
|
8
|
-
|
6
|
+
#include Modules::Validator
|
7
|
+
#attr_reader :storage, :renderer, :game, :guess
|
8
|
+
=begin
|
9
9
|
COMMANDS = {
|
10
10
|
start: 'start',
|
11
11
|
exit: 'exit',
|
@@ -16,16 +16,21 @@ module Codebreaker
|
|
16
16
|
yes: 'yes'
|
17
17
|
}.freeze
|
18
18
|
HINT_COMMAND = 'hint'
|
19
|
+
=end
|
19
20
|
MIN_SIZE_VALUE = 3
|
20
21
|
MAX_SIZE_VALUE = 20
|
21
|
-
|
22
|
+
=begin
|
22
23
|
def initialize
|
23
24
|
@storage = DataStorage.new
|
24
25
|
@renderer = Renderer.new
|
25
26
|
@game = Game.new
|
26
27
|
@statistics = Statistics.new
|
27
28
|
end
|
28
|
-
|
29
|
+
=end
|
30
|
+
def tests
|
31
|
+
puts '11111111111111111111111111111111111111111'
|
32
|
+
end
|
33
|
+
=begin
|
29
34
|
def game_menu
|
30
35
|
renderer.start_message
|
31
36
|
|
@@ -161,3 +166,4 @@ module Codebreaker
|
|
161
166
|
end
|
162
167
|
end
|
163
168
|
end
|
169
|
+
=end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codebreaker_marian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marian Rebeha
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -173,7 +173,6 @@ files:
|
|
173
173
|
- bin/console
|
174
174
|
- bin/setup
|
175
175
|
- codebreaker_marian.gemspec
|
176
|
-
- database/.gitignore
|
177
176
|
- index.rb
|
178
177
|
- lib/codebreaker_marian.rb
|
179
178
|
- lib/codebreaker_marian/entities/data_storage.rb
|
@@ -182,8 +181,6 @@ files:
|
|
182
181
|
- lib/codebreaker_marian/entities/processor.rb
|
183
182
|
- lib/codebreaker_marian/entities/renderer.rb
|
184
183
|
- lib/codebreaker_marian/entities/statistics.rb
|
185
|
-
- lib/codebreaker_marian/i18n_config.rb
|
186
|
-
- lib/codebreaker_marian/locales/en.yml
|
187
184
|
- lib/codebreaker_marian/modules/validator.rb
|
188
185
|
- lib/codebreaker_marian/version.rb
|
189
186
|
homepage: https://github.com/marikrebega/RubyGarage_2_Codebreaker_gem
|
data/database/.gitignore
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
en:
|
2
|
-
start_message: "Welcome to CodeBreaker"
|
3
|
-
choice_options: "Choose option:
|
4
|
-
%{commands}"
|
5
|
-
hard_level: "Which level you do you want to play?
|
6
|
-
%{levels}"
|
7
|
-
goodbye_message: "We are waiting for you. Come back!"
|
8
|
-
command_error: "You have passed unexpected command. Please choose one from listed commands"
|
9
|
-
rules: "Codebreaker is a logic game in which a code-breaker tries to break a secret code created by a code-maker. The codemaker, which will be played by the application we’re going to write, creates a secret code of four numbers between 1 and 6.
|
10
|
-
The codebreaker gets some number of chances to break the code (depends on chosen difficulty). In each turn, the codebreaker makes a guess of 4 numbers. The codemaker then marks the guess with up to 4 signs - + or - or empty spaces.
|
11
|
-
|
12
|
-
A + indicates an exact match: one of the numbers in the guess is the same as one of the numbers in the secret code and in the same position. For example:
|
13
|
-
Secret number - 1234
|
14
|
-
Input number - 6264
|
15
|
-
Number of pluses - 2 (second and fourth position)
|
16
|
-
|
17
|
-
A - indicates a number match: one of the numbers in the guess is the same as one of the numbers in the secret code but in a different position. For example:
|
18
|
-
Secret number - 1234
|
19
|
-
Input number - 6462
|
20
|
-
Number of minuses - 2 (second and fourth position)
|
21
|
-
|
22
|
-
An empty space indicates that there is not a current digit in a secret number.
|
23
|
-
|
24
|
-
If codebreaker inputs the exact number as a secret number - codebreaker wins the game. If all attempts are spent - codebreaker loses.
|
25
|
-
|
26
|
-
Codebreaker also has some number of hints(depends on chosen difficulty). If a user takes a hint - he receives back a separate digit of the secret code.
|
27
|
-
"
|
28
|
-
registration: "Before start, enter your name, please "
|
29
|
-
difficulty: "You had to %{hints} hints and %{attempts} attempts"
|
30
|
-
round_message: "1. Enter your secret code
|
31
|
-
2. hint
|
32
|
-
3. exit "
|
33
|
-
guess: "Opps, secret code must to be from four digits in range from 1 to 6"
|
34
|
-
lost_game_message: "Oh, your attempts ended... Your code was: %{code}"
|
35
|
-
win_game_message: "Yayy, u won the game! Congrats!"
|
36
|
-
save_results_message: "Do you want to save result? 1. yes 2. no"
|
37
|
-
have_no_hints_message: "Oh, your hints ended"
|
38
|
-
print_hint_number: "Hint number: %{code}"
|
39
|
-
registration_name_length_error: "It must be more than 3 and less than 20 symbols."
|