codebreaker-mikhail 0.1.5 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9b27a05a66bf88a3742fbed5449b6ffaa97a936aad50129b28315d07d786768
4
- data.tar.gz: b9445642ebeb0c9e13c3ccf457c9053368450c2ed91f6e9451137730df3abcef
3
+ metadata.gz: a9d518c9c4d75335e173c2014df00e54d059365f7cda7a222f8747a85ee5be47
4
+ data.tar.gz: 2f9dd4b81e36c2a7502e5f92078251b71cddfea5bbb337e77684474095e15960
5
5
  SHA512:
6
- metadata.gz: 5bad0188d94baae33335f95670c18aaca6a1b5886926574c5ad76c6a3361a4e044d6f1a6b8cf954fe628993d9ee884dc2dcf6243d99660ae551d61f89f4ea2ea
7
- data.tar.gz: 643d8387d3e929b37787e2c779925328edce4146ca9b3ce5aaf3d8a38189a853a5c31fa670cf7b398c5a649af3196956aaa5d8ecd1fd935f28685eb96ee4ff37
6
+ metadata.gz: b9722de784ab7d293f7e53c7270356f8324ad0addb140d699dee1593ac72349f6f92044fdae795c0dda40b963f54b7429aa488548634f5e1b2a9b243de0594df
7
+ data.tar.gz: d4438da1f860eed1a82fc64ad94f8003cc9439cb126106247e14d87091508d8e76acdb7204c4df9c17d111620ea2fce02399bbb1955934e7e26e09165851cb18
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- codebreaker-mikhail (0.1.4)
4
+ codebreaker-mikhail (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -10,3 +10,4 @@ require_relative "code_generator"
10
10
  require_relative "user"
11
11
  require_relative "file_store"
12
12
  require_relative "game"
13
+ require_relative "stats"
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Codebreaker
4
- module FileStore
4
+ module FileStore
5
5
  FILE_DIRECTORY = "statistics"
6
6
  FILE_NAME = "statistics.yml"
7
7
 
@@ -17,7 +17,11 @@ module Codebreaker
17
17
  (YAML.load_file(storage_path) || {})[:codebrakers] || []
18
18
  end
19
19
 
20
- def statistics
20
+ # def statistics
21
+ # load_file.each.sort_by { |game| [game[:attempts], game[:used_hints], game[:used_attempts]] }
22
+ # end
23
+
24
+ def self.statistics
21
25
  load_file.each.sort_by { |game| [game[:attempts], game[:used_hints], game[:used_attempts]] }
22
26
  end
23
27
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Codebreaker
4
- VERSION = "0.1.5"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebreaker-mikhail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikhail Bogun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-07 00:00:00.000000000 Z
11
+ date: 2022-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler