-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRun.h
More file actions
50 lines (44 loc) · 976 Bytes
/
Run.h
File metadata and controls
50 lines (44 loc) · 976 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef RUN_H
#define RUN_H
#include <stdio.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <ncurses.h>
#include <unistd.h>
#include <time.h>
#include <pthread.h>
typedef struct _Tunnel {
int size;
int direction; // - or +
int pos;
} Tunnel;
typedef struct _Board {
int width;
int height;
int ** blocks;
int numTunnels;
Tunnel * tunnels;
int score;
bool playerColor;
bool wallColor;
char * wallChar;
} Board;
typedef struct _Player {
int x;
int y;
char* avatar;
} Player;
void printScreen(Board *, Player *);
bool getInput(Player *);
void getSize(Board *);
void destroyBoard(Board *);
void moveWalls(Board *);
bool checkCollision(Board *, Player *);
void makeLine(Board *);
void makeTunnels(Board *);
void changeTunnels(Board *);
void updateTunnelPos(Board *);
bool handleArgs(Board *, Player *, int, char **, short *, short *, short *, short *, bool *);
#endif