avl._core.scoreboard_indexed module
- class avl._core.scoreboard_indexed.IndexedScoreboard(*args: Any, **kwargs: Any)[source]
- __init__(name: str, parent: Component) None[source]
Initializes the indexed scoreboard component.
- Parameters:
name (str) – Name of the indexed scoreboard.
parent (Component) – Parent component.
- set_indices(indices: list[Any]) None[source]
Sets the indices for the scoreboards.
- Parameters:
indices (list[Any]) – List of indices.
- set_verbose(verbose: bool) None[source]
Sets the verbosity of the scoreboards.
- Parameters:
verbose (bool) – Verbosity flag.
- set_min_compare_count(count: int) None[source]
Sets the minimum number of comparisons required for the scoreboards.
- Parameters:
count (int) – Minimum number of comparisons.
- get_index(item: Any) int[source]
Gets the index for the given item.
- Parameters:
item (Any) – The item to get the index for.
- Returns:
The index of the item.
- Return type:
int
- async run_phase() None[source]
The idea here is very simple - indexed scoreboard isn’t a scoreboard by itself, but rather a filter that sends inputs into the right scoreboard. For this reason, it doesn’t follow the scoreboard’s system of wait for before_item -> wait for after_item. The moment it receives any item, it passes it to the correct scoreboard.