GemCodebreaker 0.1.4 → 0.1.5

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: 16e8e3dbf49182224e2127be71cd4b430e55a8817ae112fd50d55c3d7285ad45
4
- data.tar.gz: 7d7ebf51ddae2e20888007f15d0bc378aeeeab190b96fff5c6f198d5f95f32c8
3
+ metadata.gz: 2f0aed222de26843d9e2628824cacab6d5828f5877023d53407c24147548954e
4
+ data.tar.gz: 3027c48c3a319170f1ffd3790e55c3284b755cb19aebf6b72a07300282aa640a
5
5
  SHA512:
6
- metadata.gz: 6d544d9801d2e5fd6255b2510267f31e6d2c3458e0aa5a3e65a62476a608f19a823d6ac0e516a30bedc5da7ff0a50fe5071bd879525609d306550235b6aecbb9
7
- data.tar.gz: b8b738055dc4869d91fb39235c17a03d61cc5c5e435a6d779a2100fd3f177ad405e98484aeb307690e4c8c795282994bdff655cd96ed11de4f7e269a1ddaebf2
6
+ metadata.gz: 4cb6ad1dae12a142330cae104a3cf06bb1413c64c07529d6fcf9930478f8c80e1aba3eadbfa517eca5dea4de44036288a16c329f79798ffd7d19278571038e62
7
+ data.tar.gz: ca115498fb153ae9b884de1f61b24e2d64ef2557fbcc62124145ea7e594a0d9203aaa282846b55f4f0fc2474d3f4a3a3a6df0f1baf5506b26b99aa8f3deef87b
@@ -3,7 +3,7 @@ version: 2.1
3
3
  executors:
4
4
  default:
5
5
  working_directory: ~/codebreaker
6
- description: Gem for codebreaker game
6
+ description: Gem for game codebreaker
7
7
  docker:
8
8
  - image: circleci/ruby:2.7.1
9
9
 
@@ -0,0 +1,19 @@
1
+ speedups:
2
+ rescue_vs_respond_to: true
3
+ module_eval: true
4
+ shuffle_first_vs_sample: true
5
+ for_loop_vs_each: true
6
+ each_with_index_vs_while: false
7
+ map_flatten_vs_flat_map: true
8
+ reverse_each_vs_reverse_each: true
9
+ select_first_vs_detect: true
10
+ sort_vs_sort_by: true
11
+ fetch_with_argument_vs_block: true
12
+ keys_each_vs_each_key: true
13
+ hash_merge_bang_vs_hash_brackets: true
14
+ block_vs_symbol_to_proc: true
15
+ proc_call_vs_yield: true
16
+ gsub_vs_tr: true
17
+ select_last_vs_reverse_detect: true
18
+ getter_vs_attr_reader: true
19
+ setter_vs_attr_writer: true
data/.gitignore CHANGED
@@ -8,5 +8,4 @@
8
8
  /tmp/
9
9
 
10
10
  .rspec_status
11
- Gemfile.lock
12
11
  .idea
@@ -0,0 +1,74 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ GemCodebreaker (0.1.5)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.1)
10
+ colorize (0.8.1)
11
+ concurrent-ruby (1.1.6)
12
+ diff-lcs (1.3)
13
+ docile (1.3.2)
14
+ fasterer (0.8.3)
15
+ colorize (~> 0.7)
16
+ ruby_parser (>= 3.14.1)
17
+ i18n (1.8.3)
18
+ concurrent-ruby (~> 1.0)
19
+ parallel (1.19.2)
20
+ parser (2.7.1.3)
21
+ ast (~> 2.4.0)
22
+ rainbow (3.0.0)
23
+ rake (13.0.1)
24
+ rexml (3.2.4)
25
+ rspec (3.7.0)
26
+ rspec-core (~> 3.7.0)
27
+ rspec-expectations (~> 3.7.0)
28
+ rspec-mocks (~> 3.7.0)
29
+ rspec-core (3.7.1)
30
+ rspec-support (~> 3.7.0)
31
+ rspec-expectations (3.7.0)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.7.0)
34
+ rspec-mocks (3.7.0)
35
+ diff-lcs (>= 1.2.0, < 2.0)
36
+ rspec-support (~> 3.7.0)
37
+ rspec-support (3.7.1)
38
+ rubocop (0.84.0)
39
+ parallel (~> 1.10)
40
+ parser (>= 2.7.0.1)
41
+ rainbow (>= 2.2.2, < 4.0)
42
+ rexml
43
+ rubocop-ast (>= 0.0.3)
44
+ ruby-progressbar (~> 1.7)
45
+ unicode-display_width (>= 1.4.0, < 2.0)
46
+ rubocop-ast (0.0.3)
47
+ parser (>= 2.7.0.1)
48
+ rubocop-rspec (1.41.0)
49
+ rubocop (>= 0.68.1)
50
+ ruby-progressbar (1.10.1)
51
+ ruby_parser (3.14.2)
52
+ sexp_processor (~> 4.9)
53
+ sexp_processor (4.15.0)
54
+ simplecov (0.18.5)
55
+ docile (~> 1.1)
56
+ simplecov-html (~> 0.11)
57
+ simplecov-html (0.12.2)
58
+ unicode-display_width (1.7.0)
59
+
60
+ PLATFORMS
61
+ ruby
62
+
63
+ DEPENDENCIES
64
+ GemCodebreaker!
65
+ fasterer (~> 0.8.3)
66
+ i18n (~> 1.8.3)
67
+ rake (~> 13.0.1)
68
+ rspec (~> 3.7.0)
69
+ rubocop (~> 0.84.0)
70
+ rubocop-rspec (~> 1.41.0)
71
+ simplecov (~> 0.18.5)
72
+
73
+ BUNDLED WITH
74
+ 2.1.4
@@ -4,7 +4,7 @@ module GemCodebreaker
4
4
  # Configuration class for game
5
5
  class GameConfig
6
6
  include GameConfigurations
7
- attr_reader :user_attempts, :user_hints, :difficulty_priority
7
+ attr_reader :user_attempts, :user_hints
8
8
  attr_accessor :user_nick_name, :difficulty, :max_attempts, :max_hints
9
9
 
10
10
  def initialize(user, level)
@@ -12,7 +12,6 @@ module GemCodebreaker
12
12
  @difficulty = level
13
13
  @max_attempts = GAME_LEVEL[level][:attempts]
14
14
  @max_hints = GAME_LEVEL[level][:hints]
15
- @difficulty_priority = GAME_LEVEL_PRIORITY[level]
16
15
  @user_attempts = 0
17
16
  @user_hints = 0
18
17
  end
@@ -3,8 +3,7 @@
3
3
  module GemCodebreaker
4
4
  # Game statistic class
5
5
  class GameStatistic
6
- attr_reader :user_nickname, :difficulty, :attempts_total, :attempts_used, :hints_total, :hints_used,
7
- :difficulty_priority
6
+ attr_reader :user_nickname, :difficulty, :attempts_total, :attempts_used, :hints_total, :hints_used
8
7
 
9
8
  def initialize(game)
10
9
  @user_nickname = game.config.user_nick_name
@@ -13,7 +12,6 @@ module GemCodebreaker
13
12
  @attempts_used = game.attempts
14
13
  @hints_total = game.config.max_hints
15
14
  @hints_used = game.hints
16
- @difficulty_priority = game.config.difficulty_priority
17
15
  end
18
16
  end
19
17
  end
@@ -14,9 +14,5 @@ module GemCodebreaker
14
14
  strong_hell:
15
15
  { attempts: 1,
16
16
  hints: 0 } }.freeze
17
- GAME_LEVEL_PRIORITY = { easy: 4,
18
- medium: 3,
19
- hell: 2,
20
- strong_hell: 1 }.freeze
21
17
  end
22
18
  end
@@ -5,7 +5,7 @@ module GemCodebreaker
5
5
  module SerializerDeserializer
6
6
  FILE_NAME = 'game_statistic.yml'
7
7
  STATISTIC_DIR = 'data'
8
- STORAGE_PATH = File.expand_path("./#{STATISTIC_DIR}/#{FILE_NAME}", File.dirname(__FILE__))
8
+ STORAGE_PATH = File.expand_path("./#{STATISTIC_DIR}/#{FILE_NAME}")
9
9
 
10
10
  def data_dir_get
11
11
  data_directory = File.dirname(STORAGE_PATH)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GemCodebreaker
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: GemCodebreaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasyl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-09 00:00:00.000000000 Z
11
+ date: 2020-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fasterer
@@ -116,11 +116,13 @@ extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
118
  - ".circleci/config.yml"
119
+ - ".fasterer.yml"
119
120
  - ".gitignore"
120
121
  - ".rspec"
121
122
  - ".rubocop.yml"
122
123
  - GemCodebreaker.gemspec
123
124
  - Gemfile
125
+ - Gemfile.lock
124
126
  - LICENSE.txt
125
127
  - README.md
126
128
  - bin/console.rb