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:
Richard ZinkandClaude Opus 5.5 committed 2026-11-06 09:32:40 +01:00
1 parent 7b927b0df7
commit 6880324e33
22 files changed
+59 -1

No files matched your search

+11
View File
@@ -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| {