forked from abunai59/umouse2013
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcell.h
40 lines (30 loc) · 703 Bytes
/
cell.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef CELL_H
#define CELL_H
#include <stdbool.h>
#define NOX_CELL -1
#define NOY_CELL -1
#define INF_CELL 10000
typedef struct{
// walls
bool s_wall; // south wall
bool w_wall; // west wall
// cell value
int val;
// position
int x;
int y;
} Cell;
// prototypes
void init_cell(Cell * cell, int x, int y);
void set_s_wall(Cell * cell);
void del_s_wall(Cell * cell);
bool has_s_wall(Cell * cell);
void set_w_wall(Cell * cell);
void del_w_wall(Cell * cell);
bool has_w_wall(Cell * cell);
void set_val(Cell * cell, int val);
int get_val(Cell * cell);
void set_pos(Cell * cell, int x, int y);
int get_x(Cell * cell);
int get_y(Cell * cell);
#endif