Versus map size on the match page; the size sets the number of seats
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7b927b0df7
commit
6880324e33
22 files changed
+59
-1
No files matched your search
@@ -673,6 +673,17 @@ fn teams_from(sides: &[u8], v: Option<&Value>) -> Vec<(u8, u8)> {
|
||||
sides.iter().copied().zip(teams).collect()
|
||||
}
|
||||
|
||||
// versus map sizes and how many master seats each one has
|
||||
pub const MATCH_SIZES: [usize; 7] = [80, 96, 128, 160, 192, 224, 256];
|
||||
|
||||
pub fn seats_for(size: usize) -> &'static [u8] {
|
||||
match size {
|
||||
0..=80 => &[0, 2],
|
||||
81..=96 => &[0, 2, 3],
|
||||
_ => &[0, 2, 3, 4],
|
||||
}
|
||||
}
|
||||
|
||||
fn seats_from(v: Option<&Value>) -> Vec<SeatInfo> {
|
||||
v.and_then(|x| x.as_array())
|
||||
.map(|arr| {
|
||||
|
||||
Reference in new issue
Block a user