codebreaker-rg-te 0.1.26 → 0.1.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/codebreaker/data/help.yml +112 -0
- data/lib/codebreaker/localization.rb +1 -1
- data/lib/codebreaker/storage/storage_interceptor.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 225188ca29aeca4c326dab00332c4446b490991442af3ac8579d526d19eb1d2f
|
4
|
+
data.tar.gz: 6a7235f4d382fb8b6b0080486fcba6e13eb9d63e5d2da53a4d602dea4eeb9dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c05ab37538362d200d29acb0c44b744a96cd30c9807b700465388a08e8fdcf2755852f670862a17b62296a37fcf9cff72c5c29dc7a0cbfb34c5da15a5f7b83e2
|
7
|
+
data.tar.gz: 1cde5210d0e1d7b17c05cee665569edafe2f46920ba12962b343014ec37b7900df344e26019d5ba8ca037262d672e92ebab665d3f34b933af44f37745124a6c7
|
@@ -0,0 +1,112 @@
|
|
1
|
+
en:
|
2
|
+
codebreak:
|
3
|
+
"Codebreaker Web"
|
4
|
+
codebreak_year:
|
5
|
+
"Codebreaker 2019"
|
6
|
+
hello_name:
|
7
|
+
"Hello, You name"
|
8
|
+
guess_number:
|
9
|
+
"Try to guess 4-digit number, that consists of numbers in a range from 1 to 6."
|
10
|
+
level:
|
11
|
+
"Level:"
|
12
|
+
attempts:
|
13
|
+
"Attempts:"
|
14
|
+
hints:
|
15
|
+
"Hints:"
|
16
|
+
submit:
|
17
|
+
"Submit"
|
18
|
+
show_hint:
|
19
|
+
"Show hint!"
|
20
|
+
player_name:
|
21
|
+
"Player's name:"
|
22
|
+
game_level:
|
23
|
+
"Game level:"
|
24
|
+
choose_game_level:
|
25
|
+
"Choose game level..."
|
26
|
+
simple:
|
27
|
+
"Simple - 15 attempts - 3 hints"
|
28
|
+
middle:
|
29
|
+
"Middle - 10 attempts - 2 hints"
|
30
|
+
hard:
|
31
|
+
"Hard - 5 attempts - 1 hints"
|
32
|
+
start_game_web:
|
33
|
+
"Start the game!"
|
34
|
+
rules:
|
35
|
+
"Rules"
|
36
|
+
statistics:
|
37
|
+
"Statistics"
|
38
|
+
rules_test:
|
39
|
+
"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 are going to write, creates a secret code of four numbers between 1 and 6.
|
40
|
+
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.
|
41
|
+
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:
|
42
|
+
Secret number - 1234
|
43
|
+
Input number - 6264
|
44
|
+
Number of pluses - 2 (second and fourth position)
|
45
|
+
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:
|
46
|
+
Secret number - 1234
|
47
|
+
Input number - 6462
|
48
|
+
Number of minuses - 2 (second and fourth position)
|
49
|
+
An empty space indicates that there is not a current digit in a secret number.
|
50
|
+
If codebreaker inputs the exact number as a secret number - codebreaker wins the game. If all attempts are spent - codebreaker loses.
|
51
|
+
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."
|
52
|
+
top_of_player:
|
53
|
+
"Top of Players:"
|
54
|
+
name_stat:
|
55
|
+
"Name"
|
56
|
+
level_stat:
|
57
|
+
"Level"
|
58
|
+
attempt_stat:
|
59
|
+
"Attempts Left"
|
60
|
+
hints_stat:
|
61
|
+
"Hints Left"
|
62
|
+
date_stat:
|
63
|
+
"Date"
|
64
|
+
home_stat:
|
65
|
+
"Home"
|
66
|
+
won:
|
67
|
+
"Congratulations, %{name}! You won the game!"
|
68
|
+
play_again:
|
69
|
+
"Play again!"
|
70
|
+
stat:
|
71
|
+
"Statistics"
|
72
|
+
name_lose:
|
73
|
+
"Oops, %{name}! You lose the game!"
|
74
|
+
code_was:
|
75
|
+
"The code was"
|
76
|
+
play_again:
|
77
|
+
"Play again!"
|
78
|
+
not_found:
|
79
|
+
"Not Found"
|
80
|
+
rulegame:
|
81
|
+
"You have to guess 4-digit number where each digit placed between 1 and 6.\nThe code-maker then marks the guess with up to four + and - signs.\nA + indicates an exact match, one of the numbers in the guess is the same.\nA - 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.\n"
|
82
|
+
start_game:
|
83
|
+
"Welcome to game Codebreaker\n"
|
84
|
+
wel_instruct:
|
85
|
+
"Type %{start} for starting new game.\nType %{rules} for showing rules.\nType %{stats} for showing statistics.\nType %{exit} for exit\n"
|
86
|
+
choose_difficulty: |
|
87
|
+
Choose the difficulty level from %{difficulties}
|
88
|
+
username: |
|
89
|
+
What is your name?
|
90
|
+
Enter please
|
91
|
+
question_num: |
|
92
|
+
Put the number. Attempts remain - %{attempts} You can choose hint - %{hints}
|
93
|
+
invalid_number: |
|
94
|
+
Put 4-digital number
|
95
|
+
over_hint: |
|
96
|
+
You don't have any hints
|
97
|
+
win:
|
98
|
+
"your win"
|
99
|
+
progress:
|
100
|
+
"Enter yes if you want to save your progress"
|
101
|
+
lose:
|
102
|
+
"Your lose"
|
103
|
+
new_game:
|
104
|
+
"Enter yes if you want a new game"
|
105
|
+
hello: |
|
106
|
+
Hello, your name is %{name}
|
107
|
+
empty_stat: |
|
108
|
+
You are the first one
|
109
|
+
stats: |
|
110
|
+
Stats
|
111
|
+
col_table: |
|
112
|
+
Rating Name Difficulty Attempts Total Attempts Used Hints Total Hints Used game Date
|
@@ -1,2 +1,2 @@
|
|
1
|
-
I18n.load_path << Dir[File.expand_path('./data/help.yml')]
|
1
|
+
I18n.load_path << Dir[File.expand_path('./lib/codebreaker/data/help.yml')]
|
2
2
|
I18n.config.available_locales = :en
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Codebreaker
|
2
2
|
class StorageInterceptor
|
3
|
-
DEFAULT_PATH_TO_FILE = './data/stat.yml'.freeze
|
3
|
+
DEFAULT_PATH_TO_FILE = './lib/codebreaker/data/stat.yml'.freeze
|
4
4
|
|
5
5
|
def initialize(path_to_file = DEFAULT_PATH_TO_FILE)
|
6
6
|
@path_to_file = path_to_file.empty? ? DEFAULT_PATH_TO_FILE : path_to_file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codebreaker-rg-te
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugene Tereschenko
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- lib/codebreaker.rb
|
133
133
|
- lib/codebreaker/autoload.rb
|
134
134
|
- lib/codebreaker/console.rb
|
135
|
+
- lib/codebreaker/data/help.yml
|
135
136
|
- lib/codebreaker/game.rb
|
136
137
|
- lib/codebreaker/localization.rb
|
137
138
|
- lib/codebreaker/statistics.rb
|