sciolyff 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sciolyff +1 -1
- data/lib/sciolyff/penalties.rb +1 -0
- data/lib/sciolyff.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3cd6e98f70075a515863431f659b59fcc88f7ab9bd6d01ee46329cbc5bf4eb1
|
4
|
+
data.tar.gz: 966829031a03f79bac525757c2cef44ccc515829afb066bd04779ddf6e3fb596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 382ae2b2de24a1ed587d2e7c89273d55b2f5e84c26ca8d8a7f68e16d0eb15f5e612eff41f627fe83529a6458f4fd75867952c2461ce6043fc17f08ae7a555c3c
|
7
|
+
data.tar.gz: 24d865ebbff8545257810b9ede5f31d32cf232a8a69c52ff3f6e9c79f860af4ca32d6733a1c41039ff29f78d61e3e1fe67485663d76846f4c539069e775b9295
|
data/bin/sciolyff
CHANGED
data/lib/sciolyff/penalties.rb
CHANGED
data/lib/sciolyff.rb
CHANGED
@@ -83,6 +83,12 @@ module SciolyFF
|
|
83
83
|
+ team_points_from_penalties(team_number)
|
84
84
|
end
|
85
85
|
|
86
|
+
def team_points_from_penalties(team_number)
|
87
|
+
if @penalties_by_team.nil? || @penalties_by_team[team_number].nil? then 0
|
88
|
+
else @penalties_by_team[team_number][:points]
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
86
92
|
def sort_teams_by_rank
|
87
93
|
@teams_by_number
|
88
94
|
.values
|
@@ -122,12 +128,6 @@ module SciolyFF
|
|
122
128
|
.count { |p| p[:place] < placing[:place] }
|
123
129
|
end
|
124
130
|
|
125
|
-
def team_points_from_penalties(team_number)
|
126
|
-
if @penalties_by_team.nil? || @penalties_by_team[team_number].nil? then 0
|
127
|
-
else @penalties_by_team[team_number][:points]
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
131
|
def break_tie(team_number_a, team_number_b)
|
132
132
|
medal_counts(team_number_a)
|
133
133
|
.zip(medal_counts(team_number_b))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sciolyff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Em Zhan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|