summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-08-25 19:19:50 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-08-25 19:19:50 +0100
commit58970e8a68583e61e93091989af335cdac218085 (patch)
tree38f4373a7193c27e918afafadd5630bf5943e78b /main.c
parentf155f0e0884b18a9fdac3a302bb9c9fa1dd7e5aa (diff)
downloadabelian-sandpile-58970e8a68583e61e93091989af335cdac218085.tar.gz
abelian-sandpile-58970e8a68583e61e93091989af335cdac218085.tar.bz2
abelian-sandpile-58970e8a68583e61e93091989af335cdac218085.zip
(file-handler)+implemented write_to_file
First line is the data width, then the sand particles of each cell per row.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index ab11790..a4a36b0 100644
--- a/main.c
+++ b/main.c
@@ -117,6 +117,8 @@ int main(void)
if (state.thread_alive)
pthread_cancel(step_thread);
+
+ write_to_file(&state, "data.out");
CloseWindow();
return 0;
}