Skip to content

Commit

Permalink
Saving data in file without directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilan committed Feb 24, 2025
1 parent eb1ab3e commit eb01c4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ crumb
loaf

# do not include user data
data/.rewordle
.rewordle

# do not include me as executable
**/rewordle
4 changes: 2 additions & 2 deletions src/storage.crumb
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ 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))
))
}

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")
} {
Expand Down

0 comments on commit eb01c4d

Please sign in to comment.