summaryrefslogtreecommitdiff
path: root/serial/src/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'serial/src/file.c')
-rw-r--r--serial/src/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/serial/src/file.c b/serial/src/file.c
index 3ecb613..e10b667 100644
--- a/serial/src/file.c
+++ b/serial/src/file.c
@@ -1,5 +1,6 @@
#include "file.h"
+// Read a grid from a binary file into the space without padding
void read_in(char* filename, struct GAME* game) {
FILE* file = fopen(filename, "rb");
for (int i = game->padding; i < game->height+game->padding; i++) {
@@ -8,6 +9,7 @@ void read_in(char* filename, struct GAME* game) {
fclose(file);
}
+// Write a grid to a binary file into the space without padding
void write_out(char* filename, struct GAME* game) {
FILE* file = fopen(filename, "w+");
for (int i = game->padding; i < game->height+game->padding; i++) {