killer_queen_scene_scoring 0.1.0 → 0.2.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 +4 -4
- data/README.md +103 -32
- data/killer_queen_scene_scoring.gemspec +1 -0
- data/lib/killer_queen_scene_scoring/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b3fffddeed7587fbc19cab2322b80d85a218a26d6dc948b15db8a653fbb954c5
|
|
4
|
+
data.tar.gz: 75fd1ed1d095ed0ce199512a754fc987a2a42b0c7f362b4617b334c35beb4c30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6ff2591b6f9bac96193317c02e70fc75c96fb191ed0cb93b93adc98e47f1eb0bd44430b3ac45589370983301ec82d02f47f73dda4b0db669f87c072dd6e1793
|
|
7
|
+
data.tar.gz: c4f1b932ce628944226b4fd48aabf7b1f15a93749eff8507635331b54ec169a22af1e5f6e3a0c2b65dc64affb1d7153200f555da2601b0ea5778d14041824114
|
data/README.md
CHANGED
|
@@ -1,39 +1,110 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
# Killer Queen Scene Scoring
|
|
2
|
+
[](https://travis-ci.com/acidhelm/killer_queen_scene_scoring)
|
|
3
|
+
[](https://badge.fury.io/rb/killer_queen_scene_scoring)
|
|
4
|
+
|
|
5
|
+
This is an implementation of the scene-wide scoring system that was introduced
|
|
6
|
+
in Bumble Bash 3. The idea is outlined in
|
|
7
|
+
[this Facebook post](https://www.facebook.com/events/1788575457853671/permalink/1949400981771117)
|
|
8
|
+
in the BB3 group.
|
|
9
|
+
|
|
10
|
+
# The config file
|
|
11
|
+
|
|
12
|
+
The config file is a JSON file that contains information about the bracket.
|
|
13
|
+
The file is attached to the first match in the bracket. Challonge apparently
|
|
14
|
+
doesn't allow attachments with the `.json` extension, so you must use some
|
|
15
|
+
other extension like `.txt` for it to be accepted.
|
|
16
|
+
|
|
17
|
+
The config file has some parameters, a list of teams, and the players on those
|
|
18
|
+
teams. The parameters are:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"base_point_value": 0,
|
|
23
|
+
"next_bracket": null,
|
|
24
|
+
"max_players_to_count": 3,
|
|
25
|
+
"match_values": [ 1, 1, 1, 2, 2, 3, 3 ],
|
|
26
|
+
}
|
|
13
27
|
```
|
|
14
28
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
`base_point_value`: This is a number that is added to the point values in the
|
|
30
|
+
`match_values` array. It is used in tournaments where some teams do not advance
|
|
31
|
+
to the final bracket. Set this to the number of teams that did not advance.
|
|
32
|
+
For example, if your tournament has 20 teams, and 12 play in the final bracket,
|
|
33
|
+
set `base_point_value` to 8 (20-12).
|
|
34
|
+
`next_bracket`: Set this to the slug or the Challonge ID of a bracket that
|
|
35
|
+
should be processed after the current bracket. Set it to `null` or omit it in
|
|
36
|
+
the config file of the last bracket in the tournament. If you set this to the
|
|
37
|
+
slug of a tournament that is owned by an organization, the string must be of the form
|
|
38
|
+
"org_name-bracket_name", for example, "kq-sf-GDC3" (which is owned by the "kq-sf"
|
|
39
|
+
organization).
|
|
40
|
+
`max_players_to_count`: The maximum number of players from a scene that can
|
|
41
|
+
contribute to that scene's score. All config files in a tournament must have
|
|
42
|
+
the same value for this field.
|
|
43
|
+
`match_values`: An array of integers. These are the points that are awarded
|
|
44
|
+
to the players on a team for reaching each match of the bracket. For example,
|
|
45
|
+
a team that reaches match 4 gets 2 points, since the 4th element in the array
|
|
46
|
+
is 2. The example above is for a
|
|
47
|
+
[four-team double-elimination bracket](https://challonge.com/tvtpeasf).
|
|
48
|
+
These numbers must currently be calculated by hand. However, once you calculate
|
|
49
|
+
them for a particular type of bracket (e.g., double-elimination with 12 teams),
|
|
50
|
+
you can reuse them for all future brackets of that same type.
|
|
51
|
+
|
|
52
|
+
Note that the last two values in the sample `match_values` are the same.
|
|
53
|
+
Those represent the two matches in the grand final. Those numbers are the
|
|
54
|
+
points awarded for _reaching_ a match, not _winning_ a match. Once a bracket is
|
|
55
|
+
complete, the team that won the grand final is awarded one additional point.
|
|
56
|
+
|
|
57
|
+
The config file also holds a list of teams and their players. After the
|
|
58
|
+
parameters, write a `teams` array that lists the teams, the names of their
|
|
59
|
+
players, and the scenes that the players represent.
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
/* parameters here */
|
|
64
|
+
"teams": [
|
|
65
|
+
{
|
|
66
|
+
"name": "Midwest Madness (CHI/MPLS/KC)",
|
|
67
|
+
"players": [
|
|
68
|
+
{
|
|
69
|
+
"name": "Alice",
|
|
70
|
+
"scene": "Chicago"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "Bob",
|
|
74
|
+
"scene": "Chicago"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "Charlie",
|
|
78
|
+
"scene": "Minneapolis"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "Dani",
|
|
82
|
+
"scene": "Minneapolis"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "Eve",
|
|
86
|
+
"scene": "Kansas City"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
/* other teams... */
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
```
|
|
30
94
|
|
|
31
|
-
|
|
95
|
+
The team name in the config file must match the team's name in the
|
|
96
|
+
Challonge bracket, although the case of letters may differ. This means that
|
|
97
|
+
a team must have the same name in all the brackets in a tournament.
|
|
32
98
|
|
|
33
|
-
|
|
99
|
+
# Calculating scores
|
|
34
100
|
|
|
35
|
-
|
|
101
|
+
```ruby
|
|
102
|
+
id = "tvtpeasf" # Replace this with your tournament's slug or ID
|
|
36
103
|
|
|
37
|
-
|
|
104
|
+
t = KillerQueenSceneScoring::Tournament.new(id: id, api_key: your_api_key)
|
|
38
105
|
|
|
39
|
-
|
|
106
|
+
if t.load
|
|
107
|
+
t.calculate_points
|
|
108
|
+
puts t.scene_scores.sort
|
|
109
|
+
end
|
|
110
|
+
```
|
|
@@ -9,6 +9,7 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.version = KillerQueenSceneScoring::VERSION
|
|
10
10
|
spec.authors = ["Michael Dunn"]
|
|
11
11
|
spec.email = ["acidhelm@gmail.com"]
|
|
12
|
+
spec.required_ruby_version = "~> 2.6.0"
|
|
12
13
|
|
|
13
14
|
spec.summary = "Scene-wide scoring for Killer Queen tournaments."
|
|
14
15
|
spec.description = "Classes that implement scene-wide scoring for Killer Queen tournaments."
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: killer_queen_scene_scoring
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Dunn
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-03-
|
|
11
|
+
date: 2019-03-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -135,9 +135,9 @@ require_paths:
|
|
|
135
135
|
- lib
|
|
136
136
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
137
|
requirements:
|
|
138
|
-
- - "
|
|
138
|
+
- - "~>"
|
|
139
139
|
- !ruby/object:Gem::Version
|
|
140
|
-
version:
|
|
140
|
+
version: 2.6.0
|
|
141
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
143
|
- - ">="
|