summaryrefslogtreecommitdiff
path: root/lib.h
blob: 1831f5ecf8199697cdc1a281eb1a16615434756c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef LIB_H
#define LIB_H

#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>

typedef struct State
{
  // Sandpiles
  uint64_t *data;
  size_t dwidth;

  size_t window_len;
  int multiplier;

  bool thread_alive;
} state_t;

bool load_from_file(state_t *state, const char *filepath);
bool write_to_file(state_t *state, const char *filepath);

#endif