Drop the champ select helpers the text view used (#74)

ChampSelect::remaining and current_row only served the text champ select
view that #74 removed. The follow test now looks the current pick up in the
statistics rows and builds the pickable, not Completed set from can_pick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nessarandClaude Opus 5.5 committed 2026-11-21 02:26:14 +01:00
1 parent a457a19fe5
commit 28d86d48b7
2 files changed
+10 -15

No files matched your search

+9 -2
View File
@@ -1041,14 +1041,21 @@ fn arena_champ_select_replays_bans_hovers_and_lock_in_for_the_current_challenge(
remaining: &[u32],
) {
assert_eq!(pick.anvil_champions, Some(vec![233, 64, 5, 16, 68]));
let row_of = |id: u32| rows.iter().find(|r| r.champion.id == id);
assert_eq!(
pick.current_row(rows)
pick.current
.and_then(row_of)
.map(|r| (r.champion.id, r.attempts, r.state)),
current.map(|(id, state)| (id, Some(1), Some(state)))
);
// Pickable and not Completed: the player's own hovered or locked champion stays in
// while not Completed.
let mut ids: Vec<_> = rows
.iter()
.filter(|r| pick.remaining(r))
.filter(|r| {
r.state.is_some_and(|s| s != ChampionState::Completed)
&& pick.can_pick(r.champion.id)
})
.map(|r| r.champion.id)
.collect();
ids.sort_unstable();