Skip to content

Consider normalising pygambit level spacing options #21

@edwardchalstrey1

Description

@edwardchalstrey1

Requested enahancement or feature

Currently in draw_tree we have the following args in draw_tree within src/draw_tree/core.py:

def draw_tree(
    game: str | "pygambit.gambit.Game",
    save_to: Optional[str] = None,
    scale_factor: float = 0.8,
    level_spacing: int = 4,
    sublevel_spacing: int = 2,
    width_spacing: int = 2,
    show_grid: bool = False,
) -> Optional[str]:

The level_spacing, sublevel_spacing and width_spacing args are used when the game is a pygambit.gambit.Game as a way of determining how Gambit's own layout algorithm gets converted to .ef format (see src/draw_tree/gambit_layout.py.

It may be worth updating how this works so you can pass a value between 0 and 1 to draw_tree similar to how scale_factor works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions