diff --git a/src/hal/commands/fun.rs b/src/hal/commands/fun.rs index 4efcd25..54a52b2 100644 --- a/src/hal/commands/fun.rs +++ b/src/hal/commands/fun.rs @@ -4,6 +4,8 @@ use rand::rngs::StdRng; use rand::SeedableRng; use rand::seq::IndexedRandom; +use crate::hal::commands::mario_kart_randomizer::MarioKartRandomizer; + #[poise::command(slash_command, prefix_command)] async fn bikeshed(ctx: ManifoldContext<'_>) -> ManifoldResult<()> { @@ -32,6 +34,30 @@ async fn bikeshed(ctx: ManifoldContext<'_>) -> ManifoldResult<()> { Ok(()) } -pub fn commands() -> [poise::Command; 1] { - [bikeshed()] +#[poise::command(slash_command, prefix_command)] +async fn randommk(context: ManifoldContext<'_>, count: u32, balance: bool, inside_drift: bool, different_characters: bool) -> ManifoldResult<()> { + let combos = MarioKartRandomizer::generate_combos(count, balance, inside_drift, different_characters); + + let mut combo_number = 1; + + for combo in combos { + context.send(|c| { + c.embed(|embed| { + embed + .title(format!("{combo_number}. {0}, {1}, {2}, {3}", combo.character, combo.body, combo.tires, combo.glider)) + .image(format!("https://mkrandomizer.awsxdr.com/images/characters/{0}.png", combo.character)) + .image(format!("https://mkrandomizer.awsxdr.com/images/bodies/{0}.png", combo.body)) + .image(format!("https://mkrandomizer.awsxdr.com/images/tires/{0}.png", combo.tires)) + .image(format!("https://mkrandomizer.awsxdr.com/images/gliders/{0}.png", combo.glider)) + }) + }).await?; + + combo_number += 1; + } + + Ok(()) +} + +pub fn commands() -> [poise::Command; 2] { + [bikeshed(), randommk()] } \ No newline at end of file diff --git a/src/hal/commands/mario_kart_randomizer.rs b/src/hal/commands/mario_kart_randomizer.rs new file mode 100644 index 0000000..26c7966 --- /dev/null +++ b/src/hal/commands/mario_kart_randomizer.rs @@ -0,0 +1,334 @@ +use std::collections::HashMap; +use rand::rngs::StdRng; +use rand::SeedableRng; +use rand::seq::{IndexedRandom, IteratorRandom}; + +pub struct MarioKartRandomizer { + +} + +impl MarioKartRandomizer { + pub fn generate_combos(count: u32, balance: bool, inside_drift: bool, different_characters: bool) -> Vec { + let mut result: Vec = vec![]; + let available_combinations = Self::get_available_combinations(inside_drift); + let (mut min, mut max) = Self::get_generate_range(balance, available_combinations.len() as u32); + + if different_characters { + loop { + let target_count = count - result.len() as u32; + + let mut new_combinations = + Self::generate_combos_with_count_and_range(min, max, target_count, &available_combinations); + new_combinations.dedup_by_key(|c| { c.character.clone() }); + + let mut unique_combinations = vec![]; + + for combination in new_combinations.iter().filter(|c| result.iter().find(|rc| c.character == rc.character).is_none()) { + unique_combinations.push(combination); + } + + for combination in unique_combinations { + result.push(combination.clone()); + } + + if result.len() as u32 >= count { + break; + } + + min = std::cmp::max(0, min - 10); + max = std::cmp::min(available_combinations.len() as u32 - 1, max + 10); + } + + } else { + let combos = Self::generate_combos_with_count_and_range(min, max, count, &available_combinations); + for combo in combos { + result.push(combo); + } + } + + return result; + } + + fn generate_combos_with_count_and_range(min: u32, max: u32, count: u32, combinations: &Vec) -> Vec { + let mut result = vec![]; + let mut random = StdRng::from_os_rng(); + + let mut scored_combinations: Vec = Self::score_combinations(combinations); + scored_combinations.sort_by(|c1, c2| { c1.score.total_cmp(&c2.score) }); + + let selection_slice = &scored_combinations[min as usize..max as usize]; + + for _ in 1..count { + let combo = selection_slice.choose(&mut random).unwrap(); + result.push(combo.combination.clone()); + } + + return result; + } + + fn get_available_combinations(inside_drift: bool) -> Vec { + if inside_drift { + get_kart_combinations() + } else { + let stats = get_item_stats(); + get_kart_combinations().iter().filter(|k| { stats.bodies[&k.body].inside_drift }).cloned().collect() + } + } + + fn score_combinations(combinations: &Vec) -> Vec { + let stats = get_item_stats(); + combinations.iter().map(|c| { + ScoredKartCombination { + combination: c.clone(), + score: + Self::get_stats_total(&stats.bodies[&c.body].stats) + + Self::get_stats_total(&stats.characters[&c.character]) + + Self::get_stats_total(&stats.tires[&c.tires]) + + Self::get_stats_total(&stats.gliders[&c.glider]) + , + } + }) + .collect() + } + + fn get_stats_total(stats: &ItemStats) -> f32 { + stats.ground_speed as f32 * WEIGHTS[0] + + stats.water_speed as f32 * WEIGHTS[1] + + stats.air_speed as f32 * WEIGHTS[2] + + stats.antigrav_speed as f32 * WEIGHTS[3] + + stats.acceleration as f32 * WEIGHTS[4] + + stats.weight as f32 * WEIGHTS[5] + + stats.ground_handling as f32 * WEIGHTS[6] + + stats.water_handling as f32 * WEIGHTS[7] + + stats.air_handling as f32 * WEIGHTS[8] + + stats.antigrav_handling as f32 * WEIGHTS[9] + + stats.off_road as f32 * WEIGHTS[10] + + stats.mini_turbo as f32 * WEIGHTS[11] + + stats.invincibility as f32 * WEIGHTS[12] + } + + fn get_generate_range(balance: bool, combo_count: u32) -> (u32, u32) { + let mut random = StdRng::from_os_rng(); + + if balance { + let min = ((0..combo_count).choose(&mut random).unwrap_or(0) as f32 / 8.0 * 7.0).floor() as u32; + let max = min + combo_count / 8; + return (min, max); + } + + return (0, combo_count); + } +} + +pub struct KartCombination { + pub character: String, + pub body: String, + pub tires: String, + pub glider: String, +} + +struct ScoredKartCombination { + combination: KartCombination, + score: f32, +} + +impl Clone for KartCombination { + fn clone(&self) -> Self { + Self { character: self.character.clone(), body: self.body.clone(), tires: self.tires.clone(), glider: self.glider.clone() } + } +} + +struct ItemStats { + ground_speed: i32, + water_speed: i32, + air_speed: i32, + antigrav_speed: i32, + acceleration: i32, + weight: i32, + ground_handling: i32, + water_handling: i32, + air_handling: i32, + antigrav_handling: i32, + off_road: i32, + mini_turbo: i32, + invincibility: i32, +} + +struct VehicleStats { + stats: ItemStats, + inside_drift: bool, +} + +struct Stats { + characters: HashMap, + bodies: HashMap, + tires: HashMap, + gliders: HashMap, +} + +fn get_item_stats() -> Stats { + return Stats { + characters: HashMap::from([ + (String::from("babyPeach"), ItemStats { ground_speed: 1, water_speed: 1, air_speed: 1, antigrav_speed: 1, acceleration: 4, weight: 0, ground_handling: 10, water_handling: 10, air_handling: 10, antigrav_handling: 10, off_road: 5, mini_turbo: 5, invincibility: 6 }), + (String::from("babyDaisy"), ItemStats { ground_speed: 1, water_speed: 1, air_speed: 1, antigrav_speed: 1, acceleration: 4, weight: 0, ground_handling: 10, water_handling: 10, air_handling: 10, antigrav_handling: 10, off_road: 5, mini_turbo: 5, invincibility: 6 }), + (String::from("babyRosalina"), ItemStats { ground_speed: 1, water_speed: 1, air_speed: 1, antigrav_speed: 1, acceleration: 5, weight: 0, ground_handling: 9, water_handling: 9, air_handling: 9, antigrav_handling: 9, off_road: 3, mini_turbo: 5, invincibility: 6 }), + (String::from("lemmy"), ItemStats { ground_speed: 1, water_speed: 1, air_speed: 1, antigrav_speed: 1, acceleration: 5, weight: 0, ground_handling: 9, water_handling: 9, air_handling: 9, antigrav_handling: 9, off_road: 3, mini_turbo: 5, invincibility: 6 }), + (String::from("babyMario"), ItemStats { ground_speed: 2, water_speed: 2, air_speed: 2, antigrav_speed: 2, acceleration: 5, weight: 1, ground_handling: 8, water_handling: 8, air_handling: 8, antigrav_handling: 8, off_road: 4, mini_turbo: 5, invincibility: 5 }), + (String::from("babyLuigi"), ItemStats { ground_speed: 2, water_speed: 2, air_speed: 2, antigrav_speed: 2, acceleration: 5, weight: 1, ground_handling: 8, water_handling: 8, air_handling: 8, antigrav_handling: 8, off_road: 4, mini_turbo: 5, invincibility: 5 }), + (String::from("dryBones"), ItemStats { ground_speed: 2, water_speed: 2, air_speed: 2, antigrav_speed: 2, acceleration: 5, weight: 1, ground_handling: 8, water_handling: 8, air_handling: 8, antigrav_handling: 8, off_road: 4, mini_turbo: 5, invincibility: 5 }), + (String::from("koopaTroopa"), ItemStats { ground_speed: 3, water_speed: 3, air_speed: 3, antigrav_speed: 3, acceleration: 4, weight: 2, ground_handling: 8, water_handling: 8, air_handling: 8, antigrav_handling: 8, off_road: 5, mini_turbo: 4, invincibility: 4 }), + (String::from("lakitu"), ItemStats { ground_speed: 3, water_speed: 3, air_speed: 3, antigrav_speed: 3, acceleration: 4, weight: 2, ground_handling: 8, water_handling: 8, air_handling: 8, antigrav_handling: 8, off_road: 5, mini_turbo: 4, invincibility: 4 }), + (String::from("bowserJr"), ItemStats { ground_speed: 3, water_speed: 3, air_speed: 3, antigrav_speed: 3, acceleration: 4, weight: 2, ground_handling: 8, water_handling: 8, air_handling: 8, antigrav_handling: 8, off_road: 5, mini_turbo: 4, invincibility: 4 }), + (String::from("toadette"), ItemStats { ground_speed: 3, water_speed: 3, air_speed: 3, antigrav_speed: 3, acceleration: 5, weight: 2, ground_handling: 7, water_handling: 7, air_handling: 7, antigrav_handling: 7, off_road: 2, mini_turbo: 4, invincibility: 3 }), + (String::from("wendy"), ItemStats { ground_speed: 3, water_speed: 3, air_speed: 3, antigrav_speed: 3, acceleration: 5, weight: 2, ground_handling: 7, water_handling: 7, air_handling: 7, antigrav_handling: 7, off_road: 2, mini_turbo: 4, invincibility: 3 }), + (String::from("isabelle"), ItemStats { ground_speed: 3, water_speed: 3, air_speed: 3, antigrav_speed: 3, acceleration: 5, weight: 2, ground_handling: 7, water_handling: 7, air_handling: 7, antigrav_handling: 7, off_road: 2, mini_turbo: 4, invincibility: 3 }), + (String::from("toad"), ItemStats { ground_speed: 4, water_speed: 4, air_speed: 4, antigrav_speed: 4, acceleration: 4, weight: 3, ground_handling: 7, water_handling: 7, air_handling: 7, antigrav_handling: 7, off_road: 4, mini_turbo: 4, invincibility: 3 }), + (String::from("shyGuy"), ItemStats { ground_speed: 4, water_speed: 4, air_speed: 4, antigrav_speed: 4, acceleration: 4, weight: 3, ground_handling: 7, water_handling: 7, air_handling: 7, antigrav_handling: 7, off_road: 4, mini_turbo: 4, invincibility: 3 }), + (String::from("larry"), ItemStats { ground_speed: 4, water_speed: 4, air_speed: 4, antigrav_speed: 4, acceleration: 4, weight: 3, ground_handling: 7, water_handling: 7, air_handling: 7, antigrav_handling: 7, off_road: 4, mini_turbo: 4, invincibility: 3 }), + (String::from("catPeach"), ItemStats { ground_speed: 5, water_speed: 5, air_speed: 5, antigrav_speed: 5, acceleration: 4, weight: 3, ground_handling: 6, water_handling: 6, air_handling: 6, antigrav_handling: 6, off_road: 3, mini_turbo: 4, invincibility: 3 }), + (String::from("inklingGirl"), ItemStats { ground_speed: 5, water_speed: 5, air_speed: 5, antigrav_speed: 5, acceleration: 4, weight: 3, ground_handling: 6, water_handling: 6, air_handling: 6, antigrav_handling: 6, off_road: 3, mini_turbo: 4, invincibility: 3 }), + (String::from("villagerGirl"), ItemStats { ground_speed: 5, water_speed: 5, air_speed: 5, antigrav_speed: 5, acceleration: 4, weight: 3, ground_handling: 6, water_handling: 6, air_handling: 6, antigrav_handling: 6, off_road: 3, mini_turbo: 4, invincibility: 3 }), + (String::from("diddyKong"), ItemStats { ground_speed: 5, water_speed: 5, air_speed: 5, antigrav_speed: 5, acceleration: 4, weight: 3, ground_handling: 6, water_handling: 6, air_handling: 6, antigrav_handling: 6, off_road: 3, mini_turbo: 4, invincibility: 3 }), + (String::from("peach"), ItemStats { ground_speed: 6, water_speed: 6, air_speed: 6, antigrav_speed: 6, acceleration: 3, weight: 4, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 3, mini_turbo: 4, invincibility: 1 }), + (String::from("daisy"), ItemStats { ground_speed: 6, water_speed: 6, air_speed: 6, antigrav_speed: 6, acceleration: 3, weight: 4, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 3, mini_turbo: 4, invincibility: 1 }), + (String::from("yoshi"), ItemStats { ground_speed: 6, water_speed: 6, air_speed: 6, antigrav_speed: 6, acceleration: 3, weight: 4, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 3, mini_turbo: 4, invincibility: 1 }), + (String::from("birdo"), ItemStats { ground_speed: 6, water_speed: 6, air_speed: 6, antigrav_speed: 6, acceleration: 3, weight: 4, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 3, mini_turbo: 4, invincibility: 1 }), + (String::from("peachette"), ItemStats { ground_speed: 6, water_speed: 6, air_speed: 6, antigrav_speed: 6, acceleration: 3, weight: 4, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 3, mini_turbo: 4, invincibility: 1 }), + (String::from("tanookiMario"), ItemStats { ground_speed: 6, water_speed: 6, air_speed: 6, antigrav_speed: 6, acceleration: 3, weight: 5, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 1, mini_turbo: 4, invincibility: 1 }), + (String::from("inklingBoy"), ItemStats { ground_speed: 6, water_speed: 6, air_speed: 6, antigrav_speed: 6, acceleration: 3, weight: 5, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 1, mini_turbo: 4, invincibility: 1 }), + (String::from("villagerBoy"), ItemStats { ground_speed: 6, water_speed: 6, air_speed: 6, antigrav_speed: 6, acceleration: 3, weight: 5, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 1, mini_turbo: 4, invincibility: 1 }), + (String::from("mario"), ItemStats { ground_speed: 7, water_speed: 7, air_speed: 7, antigrav_speed: 7, acceleration: 2, weight: 6, ground_handling: 4, water_handling: 4, air_handling: 4, antigrav_handling: 4, off_road: 2, mini_turbo: 3, invincibility: 3 }), + (String::from("ludwig"), ItemStats { ground_speed: 7, water_speed: 7, air_speed: 7, antigrav_speed: 7, acceleration: 2, weight: 6, ground_handling: 4, water_handling: 4, air_handling: 4, antigrav_handling: 4, off_road: 2, mini_turbo: 3, invincibility: 3 }), + (String::from("luigi"), ItemStats { ground_speed: 7, water_speed: 7, air_speed: 7, antigrav_speed: 7, acceleration: 2, weight: 6, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 1, mini_turbo: 3, invincibility: 3 }), + (String::from("iggy"), ItemStats { ground_speed: 7, water_speed: 7, air_speed: 7, antigrav_speed: 7, acceleration: 2, weight: 6, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 1, mini_turbo: 3, invincibility: 3 }), + (String::from("kamek"), ItemStats { ground_speed: 7, water_speed: 7, air_speed: 7, antigrav_speed: 7, acceleration: 2, weight: 6, ground_handling: 5, water_handling: 5, air_handling: 5, antigrav_handling: 5, off_road: 1, mini_turbo: 3, invincibility: 3 }), + (String::from("metalMario"), ItemStats { ground_speed: 8, water_speed: 8, air_speed: 8, antigrav_speed: 8, acceleration: 1, weight: 10, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 1, mini_turbo: 1, invincibility: 3 }), + (String::from("goldMario"), ItemStats { ground_speed: 8, water_speed: 8, air_speed: 8, antigrav_speed: 8, acceleration: 1, weight: 10, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 1, mini_turbo: 1, invincibility: 3 }), + (String::from("pinkGoldPeach"), ItemStats { ground_speed: 8, water_speed: 8, air_speed: 8, antigrav_speed: 8, acceleration: 1, weight: 10, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 1, mini_turbo: 1, invincibility: 3 }), + (String::from("wiggler"), ItemStats { ground_speed: 9, water_speed: 9, air_speed: 9, antigrav_speed: 9, acceleration: 1, weight: 8, ground_handling: 2, water_handling: 2, air_handling: 2, antigrav_handling: 2, off_road: 0, mini_turbo: 1, invincibility: 4 }), + (String::from("rosalina"), ItemStats { ground_speed: 8, water_speed: 8, air_speed: 8, antigrav_speed: 8, acceleration: 1, weight: 7, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 3, mini_turbo: 2, invincibility: 4 }), + (String::from("kingBoo"), ItemStats { ground_speed: 8, water_speed: 8, air_speed: 8, antigrav_speed: 8, acceleration: 1, weight: 7, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 3, mini_turbo: 2, invincibility: 4 }), + (String::from("link"), ItemStats { ground_speed: 8, water_speed: 8, air_speed: 8, antigrav_speed: 8, acceleration: 1, weight: 7, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 3, mini_turbo: 2, invincibility: 4 }), + (String::from("pauline"), ItemStats { ground_speed: 8, water_speed: 8, air_speed: 8, antigrav_speed: 8, acceleration: 1, weight: 7, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 3, mini_turbo: 2, invincibility: 4 }), + (String::from("peteyPiranha"), ItemStats { ground_speed: 8, water_speed: 8, air_speed: 8, antigrav_speed: 8, acceleration: 1, weight: 10, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 1, mini_turbo: 1, invincibility: 6 }), + (String::from("waluigi"), ItemStats { ground_speed: 9, water_speed: 9, air_speed: 9, antigrav_speed: 9, acceleration: 1, weight: 8, ground_handling: 2, water_handling: 2, air_handling: 2, antigrav_handling: 2, off_road: 0, mini_turbo: 1, invincibility: 4 }), + (String::from("donkeyKong"), ItemStats { ground_speed: 9, water_speed: 9, air_speed: 9, antigrav_speed: 9, acceleration: 1, weight: 8, ground_handling: 2, water_handling: 2, air_handling: 2, antigrav_handling: 2, off_road: 0, mini_turbo: 1, invincibility: 4 }), + (String::from("roy"), ItemStats { ground_speed: 9, water_speed: 9, air_speed: 9, antigrav_speed: 9, acceleration: 1, weight: 8, ground_handling: 2, water_handling: 2, air_handling: 2, antigrav_handling: 2, off_road: 0, mini_turbo: 1, invincibility: 4 }), + (String::from("wario"), ItemStats { ground_speed: 10, water_speed: 10, air_speed: 10, antigrav_speed: 10, acceleration: 0, weight: 9, ground_handling: 1, water_handling: 1, air_handling: 1, antigrav_handling: 1, off_road: 1, mini_turbo: 0, invincibility: 5 }), + (String::from("dryBowser"), ItemStats { ground_speed: 10, water_speed: 10, air_speed: 10, antigrav_speed: 10, acceleration: 0, weight: 9, ground_handling: 1, water_handling: 1, air_handling: 1, antigrav_handling: 1, off_road: 1, mini_turbo: 0, invincibility: 5 }), + (String::from("funkyKong"), ItemStats { ground_speed: 10, water_speed: 10, air_speed: 10, antigrav_speed: 10, acceleration: 0, weight: 9, ground_handling: 1, water_handling: 1, air_handling: 1, antigrav_handling: 1, off_road: 1, mini_turbo: 0, invincibility: 5 }), + (String::from("bowser"), ItemStats { ground_speed: 10, water_speed: 10, air_speed: 10, antigrav_speed: 10, acceleration: 0, weight: 10, ground_handling: 0, water_handling: 0, air_handling: 0, antigrav_handling: 0, off_road: 0, mini_turbo: 0, invincibility: 6 }), + (String::from("morton"), ItemStats { ground_speed: 10, water_speed: 10, air_speed: 10, antigrav_speed: 10, acceleration: 0, weight: 10, ground_handling: 0, water_handling: 0, air_handling: 0, antigrav_handling: 0, off_road: 0, mini_turbo: 0, invincibility: 6 }), + ]), + bodies: HashMap::from([ + (String::from("biddyBuggy"), VehicleStats { stats: ItemStats { ground_speed: 0, water_speed:1, air_speed:1, antigrav_speed: 2, acceleration: 7, weight: 0, ground_handling: 5, water_handling: 4, air_handling: 4, antigrav_handling: 5, off_road: 4, mini_turbo: 7, invincibility: 0 }, inside_drift: false }), + (String::from("mrScooty"), VehicleStats { stats: ItemStats { ground_speed: 0, water_speed:1, air_speed:1, antigrav_speed: 2, acceleration: 7, weight: 0, ground_handling: 5, water_handling: 4, air_handling: 4, antigrav_handling: 5, off_road: 4, mini_turbo: 7, invincibility: 0 }, inside_drift: false }), + (String::from("streetle"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:5, air_speed:2, antigrav_speed: 0, acceleration: 6, weight: 0, ground_handling: 4, water_handling: 5, air_handling: 3, antigrav_handling: 2, off_road: 6, mini_turbo: 6, invincibility: 3 }, inside_drift: false }), + (String::from("landship"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:5, air_speed:2, antigrav_speed: 0, acceleration: 6, weight: 0, ground_handling: 4, water_handling: 5, air_handling: 3, antigrav_handling: 2, off_road: 6, mini_turbo: 6, invincibility: 2 }, inside_drift: false }), + (String::from("pipeFrame"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:3, air_speed:1, antigrav_speed: 1, acceleration: 6, weight: 1, ground_handling: 5, water_handling: 4, air_handling: 2, antigrav_handling: 4, off_road: 4, mini_turbo: 6, invincibility: 3 }, inside_drift: false }), + (String::from("varmint"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:3, air_speed:1, antigrav_speed: 1, acceleration: 6, weight: 1, ground_handling: 5, water_handling: 4, air_handling: 2, antigrav_handling: 4, off_road: 4, mini_turbo: 6, invincibility: 2 }, inside_drift: false }), + (String::from("cityTripper"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:3, air_speed:1, antigrav_speed: 1, acceleration: 6, weight: 1, ground_handling: 5, water_handling: 4, air_handling: 2, antigrav_handling: 4, off_road: 4, mini_turbo: 6, invincibility: 2 }, inside_drift: false }), + (String::from("catCruiser"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:2, air_speed:4, antigrav_speed: 3, acceleration: 5, weight: 2, ground_handling: 4, water_handling: 2, air_handling: 4, antigrav_handling: 3, off_road: 3, mini_turbo: 6, invincibility: 3 }, inside_drift: false }), + (String::from("comet"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:2, air_speed:4, antigrav_speed: 3, acceleration: 5, weight: 2, ground_handling: 4, water_handling: 2, air_handling: 4, antigrav_handling: 3, off_road: 3, mini_turbo: 6, invincibility: 3 }, inside_drift: true }), + (String::from("yoshiBike"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:2, air_speed:4, antigrav_speed: 3, acceleration: 5, weight: 2, ground_handling: 4, water_handling: 2, air_handling: 4, antigrav_handling: 3, off_road: 3, mini_turbo: 6, invincibility: 2 }, inside_drift: true }), + (String::from("teddyBuggy"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:2, air_speed:4, antigrav_speed: 3, acceleration: 5, weight: 2, ground_handling: 4, water_handling: 2, air_handling: 4, antigrav_handling: 3, off_road: 3, mini_turbo: 6, invincibility: 1 }, inside_drift: false }), + (String::from("silverArrow"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:2, air_speed:3, antigrav_speed: 4, acceleration: 5, weight: 1, ground_handling: 4, water_handling: 3, air_handling: 3, antigrav_handling: 4, off_road: 5, mini_turbo: 5, invincibility: 4 }, inside_drift: false }), + (String::from("wildWiggler"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:2, air_speed:3, antigrav_speed: 4, acceleration: 5, weight: 1, ground_handling: 4, water_handling: 3, air_handling: 3, antigrav_handling: 4, off_road: 5, mini_turbo: 5, invincibility: 4 }, inside_drift: false }), + (String::from("standardBike"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:2, air_speed:3, antigrav_speed: 4, acceleration: 5, weight: 1, ground_handling: 4, water_handling: 3, air_handling: 3, antigrav_handling: 4, off_road: 5, mini_turbo: 5, invincibility: 4 }, inside_drift: false }), + (String::from("flameRider"), VehicleStats { stats: ItemStats { ground_speed: 2, water_speed:2, air_speed:3, antigrav_speed: 4, acceleration: 5, weight: 1, ground_handling: 4, water_handling: 3, air_handling: 3, antigrav_handling: 4, off_road: 5, mini_turbo: 5, invincibility: 4 }, inside_drift: false }), + (String::from("mach8"), VehicleStats { stats: ItemStats { ground_speed: 3, water_speed:3, air_speed:4, antigrav_speed: 5, acceleration: 3, weight: 3, ground_handling: 2, water_handling: 2, air_handling: 2, antigrav_handling: 4, off_road: 4, mini_turbo: 5, invincibility: 3 }, inside_drift: false }), + (String::from("sportsCoupe"), VehicleStats { stats: ItemStats { ground_speed: 3, water_speed:3, air_speed:4, antigrav_speed: 5, acceleration: 3, weight: 3, ground_handling: 2, water_handling: 2, air_handling: 2, antigrav_handling: 4, off_road: 4, mini_turbo: 5, invincibility: 3 }, inside_drift: false }), + (String::from("inkstriker"), VehicleStats { stats: ItemStats { ground_speed: 3, water_speed:3, air_speed:4, antigrav_speed: 5, acceleration: 3, weight: 3, ground_handling: 2, water_handling: 2, air_handling: 2, antigrav_handling: 4, off_road: 4, mini_turbo: 5, invincibility: 1 }, inside_drift: false }), + (String::from("tanookiKart"), VehicleStats { stats: ItemStats { ground_speed: 3, water_speed:4, air_speed:3, antigrav_speed: 3, acceleration: 2, weight: 3, ground_handling: 4, water_handling: 4, air_handling: 3, antigrav_handling: 3, off_road: 7, mini_turbo: 5, invincibility: 4 }, inside_drift: false }), + (String::from("koopaClown"), VehicleStats { stats: ItemStats { ground_speed: 3, water_speed:4, air_speed:3, antigrav_speed: 3, acceleration: 2, weight: 3, ground_handling: 4, water_handling: 4, air_handling: 3, antigrav_handling: 3, off_road: 7, mini_turbo: 5, invincibility: 3 }, inside_drift: false }), + (String::from("masterCycleZero"), VehicleStats { stats: ItemStats { ground_speed: 3, water_speed:4, air_speed:3, antigrav_speed: 3, acceleration: 2, weight: 3, ground_handling: 4, water_handling: 4, air_handling: 3, antigrav_handling: 3, off_road: 7, mini_turbo: 5, invincibility: 3 }, inside_drift: false }), + (String::from("slRoadster"), VehicleStats { stats: ItemStats { ground_speed: 3, water_speed:3, air_speed:3, antigrav_speed: 3, acceleration: 4, weight: 2, ground_handling: 3, water_handling: 2, air_handling: 3, antigrav_handling: 3, off_road: 3, mini_turbo: 5, invincibility: 4 }, inside_drift: false }), + (String::from("standardKart"), VehicleStats { stats: ItemStats { ground_speed: 3, water_speed:3, air_speed:3, antigrav_speed: 3, acceleration: 4, weight: 2, ground_handling: 3, water_handling: 2, air_handling: 3, antigrav_handling: 3, off_road: 3, mini_turbo: 5, invincibility: 3 }, inside_drift: false }), + (String::from("duke"), VehicleStats { stats: ItemStats { ground_speed: 3, water_speed:3, air_speed:3, antigrav_speed: 3, acceleration: 4, weight: 2, ground_handling: 3, water_handling: 2, air_handling: 3, antigrav_handling: 3, off_road: 3, mini_turbo: 5, invincibility: 3 }, inside_drift: false }), + (String::from("blueFalcon"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:2, air_speed:3, antigrav_speed: 4, acceleration: 3, weight: 0, ground_handling: 2, water_handling: 3, air_handling: 1, antigrav_handling: 5, off_road: 3, mini_turbo: 4, invincibility: 4 }, inside_drift: false }), + (String::from("splatBuggy"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:2, air_speed:3, antigrav_speed: 4, acceleration: 3, weight: 0, ground_handling: 2, water_handling: 3, air_handling: 1, antigrav_handling: 5, off_road: 3, mini_turbo: 4, invincibility: 3 }, inside_drift: false }), + (String::from("prancer"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:3, air_speed:3, antigrav_speed: 3, acceleration: 2, weight: 1, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 2, off_road: 2, mini_turbo: 4, invincibility: 5 }, inside_drift: false }), + (String::from("sportBike"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:3, air_speed:3, antigrav_speed: 3, acceleration: 2, weight: 1, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 2, off_road: 2, mini_turbo: 4, invincibility: 3 }, inside_drift: true }), + (String::from("jetBike"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:3, air_speed:3, antigrav_speed: 3, acceleration: 2, weight: 1, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 2, off_road: 2, mini_turbo: 4, invincibility: 3 }, inside_drift: true }), + (String::from("sneeker"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:2, air_speed:3, antigrav_speed: 3, acceleration: 2, weight: 2, ground_handling: 3, water_handling: 2, air_handling: 2, antigrav_handling: 3, off_road: 0, mini_turbo: 4, invincibility: 5 }, inside_drift: false }), + (String::from("goldStandard"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:2, air_speed:3, antigrav_speed: 3, acceleration: 2, weight: 2, ground_handling: 3, water_handling: 2, air_handling: 2, antigrav_handling: 3, off_road: 0, mini_turbo: 4, invincibility: 4 }, inside_drift: false }), + (String::from("masterCycle"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:2, air_speed:3, antigrav_speed: 3, acceleration: 2, weight: 2, ground_handling: 3, water_handling: 2, air_handling: 2, antigrav_handling: 3, off_road: 0, mini_turbo: 4, invincibility: 3 }, inside_drift: true }), + (String::from("steelDriver"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:5, air_speed:0, antigrav_speed: 2, acceleration: 1, weight: 4, ground_handling: 1, water_handling: 5, air_handling: 1, antigrav_handling: 1, off_road: 3, mini_turbo: 3, invincibility: 6 }, inside_drift: false }), + (String::from("triSpeeder"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:5, air_speed:0, antigrav_speed: 2, acceleration: 1, weight: 4, ground_handling: 1, water_handling: 5, air_handling: 1, antigrav_handling: 1, off_road: 3, mini_turbo: 3, invincibility: 6 }, inside_drift: false }), + (String::from("boneRattler"), VehicleStats { stats: ItemStats { ground_speed: 4, water_speed:5, air_speed:0, antigrav_speed: 2, acceleration: 1, weight: 4, ground_handling: 1, water_handling: 5, air_handling: 1, antigrav_handling: 1, off_road: 3, mini_turbo: 3, invincibility: 5 }, inside_drift: false }), + (String::from("circuitSpecial"), VehicleStats { stats: ItemStats { ground_speed: 5, water_speed:1, air_speed:2, antigrav_speed: 4, acceleration: 1, weight: 3, ground_handling: 1, water_handling: 1, air_handling: 0, antigrav_handling: 2, off_road: 1, mini_turbo: 3, invincibility: 6 }, inside_drift: false }), + (String::from("bDasher"), VehicleStats { stats: ItemStats { ground_speed: 5, water_speed:1, air_speed:2, antigrav_speed: 4, acceleration: 1, weight: 3, ground_handling: 1, water_handling: 1, air_handling: 0, antigrav_handling: 2, off_road: 1, mini_turbo: 3, invincibility: 6 }, inside_drift: false }), + (String::from("pWing"), VehicleStats { stats: ItemStats { ground_speed: 5, water_speed:1, air_speed:2, antigrav_speed: 4, acceleration: 1, weight: 3, ground_handling: 1, water_handling: 1, air_handling: 0, antigrav_handling: 2, off_road: 1, mini_turbo: 3, invincibility: 6 }, inside_drift: false }), + (String::from("badwagon"), VehicleStats { stats: ItemStats { ground_speed: 5, water_speed:2, air_speed:1, antigrav_speed: 3, acceleration: 0, weight: 4, ground_handling: 0, water_handling: 1, air_handling: 0, antigrav_handling: 1, off_road: 5, mini_turbo: 3, invincibility: 7 }, inside_drift: false }), + (String::from("gla"), VehicleStats { stats: ItemStats { ground_speed: 5, water_speed:2, air_speed:1, antigrav_speed: 3, acceleration: 0, weight: 4, ground_handling: 0, water_handling: 1, air_handling: 0, antigrav_handling: 1, off_road: 5, mini_turbo: 3, invincibility: 7 }, inside_drift: false }), + (String::from("standardAtv"), VehicleStats { stats: ItemStats { ground_speed: 5, water_speed:2, air_speed:1, antigrav_speed: 3, acceleration: 0, weight: 4, ground_handling: 0, water_handling: 1, air_handling: 0, antigrav_handling: 1, off_road: 5, mini_turbo: 3, invincibility: 6 }, inside_drift: false }), + ]), + tires: HashMap::from([ + (String::from("roller"), ItemStats { ground_speed: 0, water_speed: 3, air_speed: 3, antigrav_speed: 0, acceleration: 6, weight: 0, ground_handling: 4, water_handling: 4, air_handling: 4, antigrav_handling: 4, off_road: 4, mini_turbo: 6, invincibility: 0 }), + (String::from("azureRoller"), ItemStats { ground_speed: 0, water_speed: 3, air_speed: 3, antigrav_speed: 0, acceleration: 6, weight: 0, ground_handling: 4, water_handling: 4, air_handling: 4, antigrav_handling: 4, off_road: 4, mini_turbo: 6, invincibility: 0 }), + (String::from("button"), ItemStats { ground_speed: 1, water_speed: 2, air_speed: 2, antigrav_speed: 2, acceleration: 5, weight: 0, ground_handling: 3, water_handling: 3, air_handling: 2, antigrav_handling: 4, off_road: 3, mini_turbo: 5, invincibility: 3 }), + (String::from("leaf"), ItemStats { ground_speed: 1, water_speed: 2, air_speed: 2, antigrav_speed: 2, acceleration: 5, weight: 0, ground_handling: 3, water_handling: 3, air_handling: 2, antigrav_handling: 4, off_road: 3, mini_turbo: 5, invincibility: 3 }), + (String::from("cushion"), ItemStats { ground_speed: 1, water_speed: 1, air_speed: 4, antigrav_speed: 1, acceleration: 4, weight: 1, ground_handling: 2, water_handling: 1, air_handling: 3, antigrav_handling: 2, off_road: 6, mini_turbo: 5, invincibility: 6 }), + (String::from("sponge"), ItemStats { ground_speed: 1, water_speed: 1, air_speed: 4, antigrav_speed: 1, acceleration: 4, weight: 1, ground_handling: 2, water_handling: 1, air_handling: 3, antigrav_handling: 2, off_road: 6, mini_turbo: 5, invincibility: 4 }), + (String::from("gla"), ItemStats { ground_speed: 2, water_speed: 3, air_speed: 3, antigrav_speed: 2, acceleration: 4, weight: 2, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 5, mini_turbo: 4, invincibility: 5 }), + (String::from("standard"), ItemStats { ground_speed: 2, water_speed: 3, air_speed: 3, antigrav_speed: 2, acceleration: 4, weight: 2, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 5, mini_turbo: 4, invincibility: 4 }), + (String::from("blueStandard"), ItemStats { ground_speed: 2, water_speed: 3, air_speed: 3, antigrav_speed: 2, acceleration: 4, weight: 2, ground_handling: 3, water_handling: 3, air_handling: 3, antigrav_handling: 3, off_road: 5, mini_turbo: 4, invincibility: 4 }), + (String::from("slim"), ItemStats { ground_speed: 3, water_speed: 2, air_speed: 2, antigrav_speed: 4, acceleration: 2, weight: 2, ground_handling: 4, water_handling: 4, air_handling: 4, antigrav_handling: 3, off_road: 1, mini_turbo: 3, invincibility: 5 }), + (String::from("crimsonSlim"), ItemStats { ground_speed: 3, water_speed: 2, air_speed: 2, antigrav_speed: 4, acceleration: 2, weight: 2, ground_handling: 4, water_handling: 4, air_handling: 4, antigrav_handling: 3, off_road: 1, mini_turbo: 3, invincibility: 5 }), + (String::from("wood"), ItemStats { ground_speed: 3, water_speed: 2, air_speed: 2, antigrav_speed: 4, acceleration: 2, weight: 2, ground_handling: 4, water_handling: 4, air_handling: 4, antigrav_handling: 3, off_road: 1, mini_turbo: 3, invincibility: 5 }), + (String::from("monster"), ItemStats { ground_speed: 3, water_speed: 2, air_speed: 1, antigrav_speed: 2, acceleration: 2, weight: 4, ground_handling: 0, water_handling: 1, air_handling: 1, antigrav_handling: 0, off_road: 7, mini_turbo: 3, invincibility: 6 }), + (String::from("hotMonster"), ItemStats { ground_speed: 3, water_speed: 2, air_speed: 1, antigrav_speed: 2, acceleration: 2, weight: 4, ground_handling: 0, water_handling: 1, air_handling: 1, antigrav_handling: 0, off_road: 7, mini_turbo: 3, invincibility: 6 }), + (String::from("ancient"), ItemStats { ground_speed: 3, water_speed: 2, air_speed: 1, antigrav_speed: 2, acceleration: 2, weight: 4, ground_handling: 0, water_handling: 1, air_handling: 1, antigrav_handling: 0, off_road: 7, mini_turbo: 3, invincibility: 5 }), + (String::from("offRoad"), ItemStats { ground_speed: 3, water_speed: 4, air_speed: 1, antigrav_speed: 2, acceleration: 3, weight: 3, ground_handling: 1, water_handling: 1, air_handling: 2, antigrav_handling: 2, off_road: 6, mini_turbo: 3, invincibility: 6 }), + (String::from("retroOffRoad"), ItemStats { ground_speed: 3, water_speed: 4, air_speed: 1, antigrav_speed: 2, acceleration: 3, weight: 3, ground_handling: 1, water_handling: 1, air_handling: 2, antigrav_handling: 2, off_road: 6, mini_turbo: 3, invincibility: 6 }), + (String::from("triforce"), ItemStats { ground_speed: 3, water_speed: 4, air_speed: 1, antigrav_speed: 2, acceleration: 3, weight: 3, ground_handling: 1, water_handling: 1, air_handling: 2, antigrav_handling: 2, off_road: 6, mini_turbo: 3, invincibility: 6 }), + (String::from("slick"), ItemStats { ground_speed: 4, water_speed: 0, air_speed: 0, antigrav_speed: 4, acceleration: 1, weight: 3, ground_handling: 2, water_handling: 0, air_handling: 1, antigrav_handling: 2, off_road: 0, mini_turbo: 2, invincibility: 5 }), + (String::from("cyberSlick"), ItemStats { ground_speed: 4, water_speed: 0, air_speed: 0, antigrav_speed: 4, acceleration: 1, weight: 3, ground_handling: 2, water_handling: 0, air_handling: 1, antigrav_handling: 2, off_road: 0, mini_turbo: 2, invincibility: 5 }), + (String::from("metal"), ItemStats { ground_speed: 4, water_speed: 3, air_speed: 2, antigrav_speed: 1, acceleration: 0, weight: 4, ground_handling: 2, water_handling: 2, air_handling: 0, antigrav_handling: 1, off_road: 2, mini_turbo: 2, invincibility: 6 }), + (String::from("gold"), ItemStats { ground_speed: 4, water_speed: 3, air_speed: 2, antigrav_speed: 1, acceleration: 0, weight: 4, ground_handling: 2, water_handling: 2, air_handling: 0, antigrav_handling: 1, off_road: 2, mini_turbo: 2, invincibility: 5 }), + ]), + gliders: HashMap::from([ + (String::from("cloud"), ItemStats { ground_speed: 0, water_speed: 1, air_speed: 1, antigrav_speed: 1, acceleration: 2, weight: 0, ground_handling: 1, water_handling: 0, air_handling: 2, antigrav_handling: 1, off_road: 1, mini_turbo: 2, invincibility: 0 }), + (String::from("parachute"), ItemStats { ground_speed: 0, water_speed: 1, air_speed: 1, antigrav_speed: 1, acceleration: 2, weight: 0, ground_handling: 1, water_handling: 0, air_handling: 2, antigrav_handling: 1, off_road: 1, mini_turbo: 2, invincibility: 0 }), + (String::from("flower"), ItemStats { ground_speed: 0, water_speed: 1, air_speed: 1, antigrav_speed: 1, acceleration: 2, weight: 0, ground_handling: 1, water_handling: 0, air_handling: 2, antigrav_handling: 1, off_road: 1, mini_turbo: 2, invincibility: 0 }), + (String::from("paper"), ItemStats { ground_speed: 0, water_speed: 1, air_speed: 1, antigrav_speed: 1, acceleration: 2, weight: 0, ground_handling: 1, water_handling: 0, air_handling: 2, antigrav_handling: 1, off_road: 1, mini_turbo: 2, invincibility: 0 }), + (String::from("peachParasol"), ItemStats { ground_speed: 0, water_speed: 0, air_speed: 1, antigrav_speed: 1, acceleration: 2, weight: 1, ground_handling: 1, water_handling: 1, air_handling: 2, antigrav_handling: 0, off_road: 0, mini_turbo: 2, invincibility: 0 }), + (String::from("parafoil"), ItemStats { ground_speed: 0, water_speed: 0, air_speed: 1, antigrav_speed: 1, acceleration: 2, weight: 1, ground_handling: 1, water_handling: 1, air_handling: 2, antigrav_handling: 0, off_road: 0, mini_turbo: 2, invincibility: 0 }), + (String::from("bowserKite"), ItemStats { ground_speed: 0, water_speed: 0, air_speed: 1, antigrav_speed: 1, acceleration: 2, weight: 1, ground_handling: 1, water_handling: 1, air_handling: 2, antigrav_handling: 0, off_road: 0, mini_turbo: 2, invincibility: 0 }), + (String::from("mktvParafoil"), ItemStats { ground_speed: 0, water_speed: 0, air_speed: 1, antigrav_speed: 1, acceleration: 2, weight: 1, ground_handling: 1, water_handling: 1, air_handling: 2, antigrav_handling: 0, off_road: 0, mini_turbo: 2, invincibility: 0 }), + (String::from("warioWing"), ItemStats { ground_speed: 1, water_speed: 0, air_speed: 2, antigrav_speed: 1, acceleration: 1, weight: 2, ground_handling: 1, water_handling: 1, air_handling: 1, antigrav_handling: 0, off_road: 0, mini_turbo: 1, invincibility: 1 }), + (String::from("plane"), ItemStats { ground_speed: 1, water_speed: 0, air_speed: 2, antigrav_speed: 1, acceleration: 1, weight: 2, ground_handling: 1, water_handling: 1, air_handling: 1, antigrav_handling: 0, off_road: 0, mini_turbo: 1, invincibility: 1 }), + (String::from("gold"), ItemStats { ground_speed: 1, water_speed: 0, air_speed: 2, antigrav_speed: 1, acceleration: 1, weight: 2, ground_handling: 1, water_handling: 1, air_handling: 1, antigrav_handling: 0, off_road: 0, mini_turbo: 1, invincibility: 1 }), + (String::from("paraglider"), ItemStats { ground_speed: 1, water_speed: 0, air_speed: 2, antigrav_speed: 1, acceleration: 1, weight: 2, ground_handling: 1, water_handling: 1, air_handling: 1, antigrav_handling: 0, off_road: 0, mini_turbo: 1, invincibility: 1 }), + (String::from("super"), ItemStats { ground_speed: 1, water_speed: 1, air_speed: 2, antigrav_speed: 0, acceleration: 1, weight: 1, ground_handling: 1, water_handling: 0, air_handling: 1, antigrav_handling: 1, off_road: 1, mini_turbo: 1, invincibility: 1 }), + (String::from("waddleWing"), ItemStats { ground_speed: 1, water_speed: 1, air_speed: 2, antigrav_speed: 0, acceleration: 1, weight: 1, ground_handling: 1, water_handling: 0, air_handling: 1, antigrav_handling: 1, off_road: 1, mini_turbo: 1, invincibility: 1 }), + (String::from("hylianKite"), ItemStats { ground_speed: 1, water_speed: 1, air_speed: 2, antigrav_speed: 0, acceleration: 1, weight: 1, ground_handling: 1, water_handling: 0, air_handling: 1, antigrav_handling: 1, off_road: 1, mini_turbo: 1, invincibility: 1 }), + ]), + }; +} + +fn get_kart_combinations() -> Vec { + let stats = get_item_stats(); + return stats.characters.keys().flat_map(|character_key| + stats.bodies.keys().flat_map(|body_key| + stats.tires.keys().flat_map(|tire_key| + stats.gliders.keys().map(|glider_key| + KartCombination { character: character_key.clone(), body: body_key.clone(), tires: tire_key.clone(), glider: glider_key.clone() })))) + .collect(); +} + +const WEIGHTS: [f32; 13] = [ + 0.06183157, + 0.3546521, + 3.3309798, + 1.3900887, + 1.1031244, + -1.195823, + -0.19770056, + 0.26197544, + 1.7109816, + -0.10846921, + 0.091645695, + 2.9054618, + -0.15963471 +]; \ No newline at end of file diff --git a/src/hal/commands/mod.rs b/src/hal/commands/mod.rs index 15ae40a..93c76ef 100644 --- a/src/hal/commands/mod.rs +++ b/src/hal/commands/mod.rs @@ -1,5 +1,6 @@ mod utility; mod fun; +mod mario_kart_randomizer; use manifold::{ManifoldData}; use manifold::error::{ManifoldError};