Python Forum

Full Version: saving progress, go to a new screen, then resume
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Just registered. And have an assignment which includes the following requirement that I am struggling with.
Typing 'blabla' should take to a new screen where a text is displayed. After reading the text, typing 'blablaba' should allow to go back where the script was left at.
I do not need the exact code but some hints. It should not require accessing additional file(s).
What do you mean by "take to a new screen"?
The new screen terminology - I assume you mean this is not a terminal program, rather it uses a GUI and launches a second window, which you then want to close to return to the first window? If so, which GUI are you using?

Or, is this a webapp and you need the browser to display a different page then return? Easy to do in Flask.
Thanks for the reply. I should have been more specific.
The task is to write a code for a card game of one's choice, where the player can ask to read the game's rules with an "--help" input and come back to where they left off with another command. I hope this is clearer. Preferably without using Flask.
Still not all that clear. Such a game could be implemented as a simple text game, as a GUI based game (tkinter, qt, gtk, ...) as a PyGame as a Turtle program.
(Jan-10-2021, 10:14 PM)deanhystad Wrote: [ -> ]Still not all that clear. Such a game could be implemented as a simple text game, as a GUI based game (tkinter, qt, gtk, ...) as a PyGame as a Turtle program.

In the first instance, it would be a text game, if possible.
With a text game, how do you envision returning from the help screen?
(Jan-11-2021, 12:46 AM)jefsummers Wrote: [ -> ]With a text game, how do you envision returning from the help screen?

The assignment says: "type '--resume'..." to go back to the game.
I do not know how to implement such a feature except via an "input" command, that is why I am asking here.
That will work, just need to then print the game board on response to --resume