Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Save/load for Pedestrians #20

Closed
jefflunt opened this Issue · 3 comments

1 participant

@jefflunt
Owner

Implement the ability for a Pedestrian to save their state/history, and for it to be restored from disk/database, whatever.

@jefflunt
Owner

A shutdown hook should do the trick. Save the list of pedestrians, with their paths, current direction, etc.

@jefflunt
Owner

Actually, forget the shutdown hook. Here's the design I'd rather see:
1. A "Save" button that allows users to save manually
2. A "Load" button
3. A "Quit" button. If the user hasn't saved, then they are asked if they would like to save at this point. Regardless if they save or not, "Quit" exits the game as its last action.
4. Save the "time of day" as well.

@jefflunt jefflunt referenced this issue from a commit
@jefflunt References #20 - "Save/load for Pedestrians"
The save and load functions are implemented, and unit tests in place. However, I need to do some live, functional testing to confirm before considering this closed.
f5d5f1c
@jefflunt jefflunt referenced this issue from a commit
@jefflunt References #20 - Basic save/load methods are in place and tested. Nee…
…d to add UI elements and actualy saving/loading of Pedestrians.
b95e72b
@jefflunt jefflunt closed this in 3df08f8
@jefflunt
Owner

Simplified the design. There's a "Quit" button. When you press it, the state is saved (with all the pedestrians). The file for 4k Pedestrians is only 188k on disk - very small.

There's no asking if the user wants to save - it's automatic. We can worry about state loading and choosing later. The rest really isn't all that important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.