Skip to content

Always use Gambit layout when loading from EFG #54

@edwardchalstrey1

Description

@edwardchalstrey1

Requested enahancement or feature

  • Update the logic in generate_tikz to use the gambit layout when receiving a EFG file, as is done when receiving a game object:
    # If user supplied an EFG file, convert it to .ef first so the existing
    # ef-based pipeline can be reused. efg_dl_ef returns a path string when
    # it successfully writes the .ef file.
    ef_file = game
    if isinstance(game, str):
        if game.lower().endswith('.efg'):
            try:
                ef_file = efg_dl_ef(game)
            except Exception:
                # fall through and let ef_to_tex raise a clearer error later
                pass
    else:
        from .gambit_layout import gambit_layout_to_ef
        # Generate the ef, use normalised spacing options
        ef_file = gambit_layout_to_ef(
            game,
            save_to=save_to,
            level_multiplier=level_scaling*4,
            sublevel_multiplier=sublevel_scaling*2 ,
            xshift_multiplier=width_scaling*2,
            hide_action_labels=hide_action_labels,
            shared_terminal_depth=shared_terminal_depth,
        )
  • Remove the efg_dl_ef function and DefaultLayout which are no longer required.

Metadata

Metadata

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