build a separate module to handle all file i/o. file i/o can be taken from prototype code, but data format needs to be simplified, perhaps raw text with 1 entry per line?
Data that needs to be stored and updated in files for persistence:
contacts
cards collected
username/contact/handle
settings?
read-only data that should come from files
game's public key
strings for all of the game cards
sprite bmps in /assets
ideally the module will have a few member functions:
init() will open files and load all data into in-memory structures
save() will save the r/w files to flash
reload() might be necessary to load just the r/w files?
there is some state that should be derived from the files and calculated on load:
current game # based on the highest game # with two cards
build a separate module to handle all file i/o. file i/o can be taken from prototype code, but data format needs to be simplified, perhaps raw text with 1 entry per line? Data that needs to be stored and updated in files for persistence:
read-only data that should come from files
ideally the module will have a few member functions:
there is some state that should be derived from the files and calculated on load: