From eb01c4d5018a32d58b4463e524a14a8eacc0f122 Mon Sep 17 00:00:00 2001 From: Ron Ilan Date: Sun, 23 Feb 2025 22:27:50 -0800 Subject: [PATCH] Saving data in file without directory. --- .gitignore | 2 +- src/storage.crumb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ff2b087..bc27536 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ crumb loaf # do not include user data -data/.rewordle +.rewordle # do not include me as executable **/rewordle \ No newline at end of file diff --git a/src/storage.crumb b/src/storage.crumb index b1dd605..b9cbc40 100644 --- a/src/storage.crumb +++ b/src/storage.crumb @@ -25,7 +25,7 @@ prep_string = { state key -> } save = { state -> - (write_file "data/.rewordle" (join + (write_file ".rewordle" (join (prep_string state RESULTS) "\n" (prep_string state STREAK) "\n" (string (get state WORD_INDEX)) @@ -33,7 +33,7 @@ save = { state -> } read = { - status = (read_file "./data/.rewordle") + status = (read_file ".rewordle") <- (if (is status void) { <- (list "0:0:0:0:0:0:0" "0:0" "0") } {