Skip to content

Instantly share code, notes, and snippets.

@kdmukai
Last active April 14, 2023 13:33
Show Gist options
  • Save kdmukai/349025f1a82da0bba53c2f7e3397c0ae to your computer and use it in GitHub Desktop.
Save kdmukai/349025f1a82da0bba53c2f7e3397c0ae to your computer and use it in GitHub Desktop.
SeedSigner main loop pseudocode to demonstrate changes in the Flow-based testing PR #339
Controller:
create initial Destination (** configurable; MainMenuView by default)
infinite while loop:
next_destination.run()
Destination.run():
** Destination._instantiate_view():
instantiate View
** Destination._run_view():
View.run():
do some setup
** View.run_screen():
instantiate its Screen (may be a generic Screen, may be specific)
Screen.display():
(render the screen, listen for user input)
return the user's selection
return the user's selection
receives the user's selection
creates the next Destination
returns that Destination to its calling Destination (above).
received the next Destination from the View.
return next Destination to the Controller
Controller receives its next_destination
** Check for StopFlowBasedTestCommand
Controller:
create initial Destination (MainMenuView)
infinite while loop:
next_destination.run()
Destination.run(): (view.py, line 96)
insantiate View
View.run():
do some setup
instantiate its Screen (may be a generic Screen, may be specific)
Screen.display():
(render the screen, listen for user input)
return the user's selection
receives the user's selection
creates the next Destination
returns that Destination to its calling Destination (above).
received the next Destination from the View.
return next Destination to the Controller
Controller receives its next_destination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment