[Tutor] my text adventure, saving and restoring
din22 at earthlink.net
Mon Dec 5 03:04:22 CET 2005
thanks that was very helpful. i added all that stuff because i was
trying to figure out some way of getting at the descriptions and exits.
that is the part i'm stuck on. but knowing that world is all i need is
good because i can focus my efforts better. thanks.
> You could make your save() method a lot simpler; something like this:
> def save(self):
> f = open('savefile', 'w')
> This is all you need, because 'world' contains all the information
> about your world. Then, when you load the data back, you will need to
> figure out some way of building your 'rooms' data structure from
> Does this help?
> Tutor maillist - Tutor at python.org
More information about the Tutor