from __future__ import annotations from .genome import Genome def genome_card_html(g: Genome, *, compact: bool = False) -> str: parts = ", ".join(f"{p.count}× {p.kind}" if p.count > 1 else p.kind for p in g.parts) # Compact variant for the Splice Bench: name + one parts line only. Dropping the # traits list and story keeps both A/B cards a fixed short height so the two # columns (and the Tweak/Apply rows below them) stay symmetric. The palette # swatches were removed from the reveal card (visual clutter under the name). if compact: return (f'

{g.name}

' f'

{parts}

') traits = "".join(f"
  • {t}
  • " for t in g.traits) return (f'

    {g.name}

    ' f'

    {parts}

    ' f'' f'

    {g.story}

    ') def share_text(g: Genome) -> str: return (f"I spliced {g.name} in Hatchimera — " f"{', '.join(p.kind for p in g.parts)}. {g.story} #BuildSmallHackathon")