-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFile_man.h
More file actions
26 lines (24 loc) · 621 Bytes
/
Copy pathFile_man.h
File metadata and controls
26 lines (24 loc) · 621 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once
#include <stdint.h>
#include "options.h"
#include <fstream> // File RW
#include <iostream> // For logging to console
#include <unistd.h>
// Using cout, endl, and from std
using std::cout;
using std::endl;
class File_man {
public:
File_man();
// Function declarations
void open_file(); // Creates or opens a file to store game data to
int read_tile(int x, int y);
void write_tile(int x, int y, uint8_t val);
uint64_t read_score();
void write_score(uint64_t score);
uint16_t read_board_size();
void write_board_size(uint16_t);
bool is_new_file();
std::fstream file;
bool newFile;
};