Python Forum
saving progress, go to a new screen, then resume
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
saving progress, go to a new screen, then resume
#1
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).
Reply
#2
What do you mean by "take to a new screen"?
Reply
#3
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.
Reply
#4
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.
Reply
#5
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.
Reply
#6
(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.
Reply
#7
With a text game, how do you envision returning from the help screen?
Reply
#8
(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.
Reply
#9
That will work, just need to then print the game board on response to --resume
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTimer with pause/resume functions? MegasXLR 9 11,173 May-20-2018, 04:20 PM
Last Post: MegasXLR

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020