mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-16 23:50:12 +01:00
feat(themes): whitelist governance, synergy cap, docs + tests; feat(random): laid roadwork for random implementation, testing in headless confirmed
This commit is contained in:
parent
03e839fb87
commit
16261bbf09
34 changed files with 12594 additions and 23 deletions
|
|
@ -65,6 +65,7 @@ def run(
|
|||
enforcement_mode: str = "warn",
|
||||
allow_illegal: bool = False,
|
||||
fuzzy_matching: bool = True,
|
||||
seed: Optional[int | str] = None,
|
||||
) -> DeckBuilder:
|
||||
"""Run a scripted non-interactive deck build and return the DeckBuilder instance."""
|
||||
scripted_inputs: List[str] = []
|
||||
|
|
@ -109,6 +110,12 @@ def run(
|
|||
return ""
|
||||
|
||||
builder = DeckBuilder(input_func=scripted_input)
|
||||
# Optional deterministic seed for Random Modes (does not affect core when unset)
|
||||
try:
|
||||
if seed is not None:
|
||||
builder.set_seed(seed) # type: ignore[attr-defined]
|
||||
except Exception:
|
||||
pass
|
||||
# Mark this run as headless so builder can adjust exports and logging
|
||||
try:
|
||||
builder.headless = True # type: ignore[attr-defined]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue