projects
/
tabakrolletjie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Save game support
[tabakrolletjie.git]
/
tabakrolletjie
/
utils.py
diff --git
a/tabakrolletjie/utils.py
b/tabakrolletjie/utils.py
index 19364c2b013c46279e94d6eed8b3282002e8a45d..b237467ded10e499d5b8f4b69c76816d87a6c25e 100644
(file)
--- a/
tabakrolletjie/utils.py
+++ b/
tabakrolletjie/utils.py
@@
-95,6
+95,13
@@
def save_file_exists():
return os.path.isfile(savefile)
return os.path.isfile(savefile)
+def get_save_data():
+ savefile = get_save_file_name()
+ with open(savefile, 'rb') as f:
+ data = json.load(f)
+ return data
+
+
def write_save_file(json_data):
save_dir = save_location()
if not os.path.exists(save_dir):
def write_save_file(json_data):
save_dir = save_location()
if not os.path.exists(save_dir):