codebreaker_kirill 0.3.3 → 1.0.0

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: 599620e5b4307758f007792426ec78f5b034a4ca32ec1c06b93660a2beec251e
4
- data.tar.gz: d4fa8ccd57007b90a1e63e3f9cec57d29fe5144c6e5fe6e9cb896968ded082b0
3
+ metadata.gz: 03bddb3432e90811fc0b774863524cc77b31d8d6ef333f40294a823558d7f952
4
+ data.tar.gz: 5e5c9fe328e24f3418ae00f06a1a533f95ce103557f302e291dfbc4782a107fb
5
5
  SHA512:
6
- metadata.gz: bb760cc9f2ef0dd5d1b873df477096029918f4910d7380b27b500597762bf6ac8b0afaf155416081dce3cc80114a12062a695ba8b1a54cffcc6a04aef3cee91a
7
- data.tar.gz: ff28fef2f9927e20d11d22f56ca55d150ed6dc1cbac45e072840061bdb81ea1a631d3f8ba4de5e26610c19e2e7cd3c5fa0f386565fc848889b93d18faa8227e2
6
+ metadata.gz: e70b37a7b95ceca8e465524bda082bb6def70b9292ff7caced08acc62e91449abf52ea97e60101ac100121a01a5c68d505c0a1ac26ca1dda035287bd2405b820
7
+ data.tar.gz: 1649b7b0235f9a90e860ba341d0db3eb0f6b5fe35a7d98ad9352a49b0e2fb68c246e7b61623bc56408bca7e16d015b10ba0444898b52e1bffd3a17ceac43acb3
@@ -13,6 +13,7 @@ class Stats
13
13
 
14
14
  def self.show_stats
15
15
  @data = File.exist?('stats.yml') ? YAML.load_file('stats.yml') : []
16
+ @data.sort_by! { |user| [user.attempts[:all], user.attempts[:used], user.hints[:used]] }
16
17
  @data.each_with_index do |user, index|
17
18
  stats_format(user, index)
18
19
  end
@@ -3,5 +3,5 @@
3
3
  require_relative 'game'
4
4
 
5
5
  module CodebreakerKirill
6
- VERSION = '0.3.3'
6
+ VERSION = '1.0.0'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebreaker_kirill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Dudchenko
@@ -32,7 +32,6 @@ files:
32
32
  - lib/codebreaker_kirill/guess_handler.rb
33
33
  - lib/codebreaker_kirill/settings.rb
34
34
  - lib/codebreaker_kirill/stats.rb
35
- - lib/codebreaker_kirill/stats.yml
36
35
  - lib/codebreaker_kirill/user.rb
37
36
  - lib/codebreaker_kirill/validations.rb
38
37
  - lib/codebreaker_kirill/version.rb
@@ -1,34 +0,0 @@
1
- ---
2
- - !ruby/object:User
3
- name: kirill
4
- difficulty:
5
- :attempts: 5
6
- :hints: 1
7
- attempts:
8
- :all: 5
9
- :used: 0
10
- hints:
11
- :all: 1
12
- :used: 0
13
- - !ruby/object:User
14
- name: Stacy
15
- difficulty:
16
- :attempts: 10
17
- :hints: 1
18
- attempts:
19
- :all: 10
20
- :used: 0
21
- hints:
22
- :all: 1
23
- :used: 1
24
- - !ruby/object:User
25
- name: Dima
26
- difficulty:
27
- :attempts: 5
28
- :hints: 1
29
- attempts:
30
- :all: 5
31
- :used: 2
32
- hints:
33
- :all: 1
34
- :used: 0