new_super_codebreaker_2021 0.4.3 → 0.4.4

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: b01bc7a275dbe137e6879ba102273580840d82b6073f218b69777734569d1fa2
4
- data.tar.gz: a2fad34a1922ca14d468330854af5a8e77502648a69976871fdc97dc3ef0af71
3
+ metadata.gz: 310473574af90875c8838fadf808a3293e7667f1452c90b28618906f20f4d43d
4
+ data.tar.gz: 7df218a49809e4811ed1adc27093fc4bc9a7353c23b82bf81160421989b7c5a3
5
5
  SHA512:
6
- metadata.gz: 1d7119bb3c56e309023745790971210f91f86413d959499b102991f9124679392a89fb372acaca64c61bf3095f674a355e50ae6372b627427d486487fdd030b1
7
- data.tar.gz: 962f3f97f315a8b754cfb8f2c7288550563b8caa88eae34e7d59f6f6e038f738663f335042cda618524387286b68ef1fb07522e946f7d178440feadba886e228
6
+ metadata.gz: 690e606a26291342c8fe91387db9d467403e179bbed937f9bc0ad1ae11cb9f7a7970d51ea2295a836910a500a7b73608f51cbbaab24190f2f4fff58d5cd84f07
7
+ data.tar.gz: 7b89164a1189f3a81f360fec5cf5fe839708c314b9497e1dbd307b12f607be24e083fa4a78f3790b6b225936fe0e3d925a4bd5e39756cc44bf5e02b21c3f73ea
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NewSuperCodebreaker2021
4
- VERSION = '0.4.3'
4
+ VERSION = '0.4.4'
5
5
  end
data/lib/show_content.rb CHANGED
@@ -9,23 +9,8 @@ module ShowContent
9
9
 
10
10
  def show_stats(file)
11
11
  data = YAML.load_file(file) || []
12
- create_table(data.sort_by(&:hints_used).sort_by(&:attempts_used).sort_by { |game| -game.difficulty })
12
+ data.sort_by(&:hints_used).sort_by(&:attempts_used).sort_by { |game| -game.difficulty }
13
13
  rescue Errno::ENOENT
14
14
  []
15
15
  end
16
-
17
- private
18
-
19
- def create_table(users)
20
- table = Terminal::Table.new(headings: ['Rating', 'Name', 'Difficulty', 'Attempts Total',
21
- 'Attempts Used', 'Hints Total', 'Hints Used'])
22
- rate = 1
23
-
24
- users.each do |user|
25
- table.add_row([rate, user.name, DIFFICULTY.keys[user.difficulty],
26
- user.attempts_total, user.attempts_used, user.hints_used, user.hints_total])
27
- rate += 1
28
- end
29
- table
30
- end
31
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: new_super_codebreaker_2021
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nazar Dakhno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-06 00:00:00.000000000 Z
11
+ date: 2021-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fasterer