Show live Arena champion picks and crowd favorites (#13)

This commit is contained in:
nessar authored and nessar committed 2026-11-19 22:17:14 +01:00
1 parent fabaa8a60f
commit f4a9e5e7a8
11 files changed
+636 -39

No files matched your search

+14
View File
@@ -569,6 +569,7 @@ struct ClientState {
gameflow: Gameflow,
tracks: HashMap<String, u32>,
waits: Vec<Duration>,
selection: Option<arena_tracker_core::ChampSelect>,
}
impl FakeClient {
@@ -633,6 +634,10 @@ impl FakeClient {
self.state.lock().unwrap().gameflow.game_id = game_id;
}
pub fn set_selection(&self, value: arena_tracker_core::ChampSelect) {
self.state.lock().unwrap().selection = Some(value);
}
pub fn set_track(&self, name: &str, value: u32) {
self.state.lock().unwrap().tracks.insert(name.into(), value);
}
@@ -659,6 +664,15 @@ impl GameClientSource for FakeClient {
Ok(state.gameflow.clone())
}
fn champ_select(&self) -> Result<arena_tracker_core::ChampSelect, ClientError> {
self.state
.lock()
.unwrap()
.selection
.clone()
.ok_or(ClientError::Absent)
}
fn official_progress(&self, track_name: &str) -> Result<Option<u32>, ClientError> {
let state = self.state.lock().unwrap();
state.signed_in.as_ref().ok_or(ClientError::Absent)?;