Skip to content

Commit

Permalink
yay
Browse files Browse the repository at this point in the history
  • Loading branch information
kkevlar committed Jun 14, 2024
1 parent d36377a commit cef624c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 5 additions & 2 deletions mjoy_core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,25 @@ fn main() {
frozen
} else {
let team0 = Team {
name: "Etherial Narwhals".to_owned(),
name: "Elemental Moose".to_owned(),
players: vec![],
out_index: 0,
};
let team1 = {
let mut t = team0.clone();
t.name = "Lucky Bulldogs".to_owned();
t.out_index = 1;
t
};
let team2 = {
let mut t = team0.clone();
t.name = "Potato Sluts".to_owned();
t.out_index = 2;
t
};
let team3 = {
let mut t = team0.clone();
t.name = "Stubborn TrashPandas".to_owned();
t.out_index = 3;
t
};
Expand Down Expand Up @@ -189,7 +192,7 @@ fn main() {
let mut thresh = 0.9f32;
let mut change_thresh_time = std::time::Instant::now() + std::time::Duration::from_secs(1);
let mut gui_render_time = std::time::Instant::now();
let mut game_state: GameState = GameState::GameActive;
let mut game_state: GameState = GameState::TeamSelect;
let mut binder = crate::bindings::Binder::new(config.binding_names_file.clone());
let mut team_select_time: Option<std::time::Instant> = None;
loop {
Expand Down
10 changes: 2 additions & 8 deletions mjoy_core/src/outjoy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,7 @@ impl Outjoy {
}

let average = match count {
0 => {
eprintln!("No players found for team {}", self.team.name);
0 as f32
}
0 => 0 as f32,
_ => sum / count as f32,
};
let average = average.clamp(-1.0f32, 1.0f32);
Expand Down Expand Up @@ -303,10 +300,7 @@ impl Outjoy {
}

let average = match count {
0 => {
eprintln!("No players found for team");
0 as f32
}
0 => 0 as f32,
_ => sum / count as f32,
};

Expand Down

0 comments on commit cef624c

Please sign in to comment.