-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
40 lines (31 loc) · 943 Bytes
/
main.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
40
#ifndef MAIN_H_INCLUDED
#define MAIN_H_INCLUDED
#include <netinet/in.h>
#include "fadecube.h"
#include "snake.h"
typedef struct {
char *user_direction;
unsigned char *gameover;
} handle_user_params_t;
void *handle_user( handle_user_params_t * );
typedef struct {
char *user_direction;
unsigned char *gameover;
snake_node_t **snake_head;
coord_t *food;
pthread_mutex_t *draw_mutex;
pthread_cond_t *draw_condition_var;
} handle_snake_params_t;
void *handle_snake( handle_snake_params_t * );
typedef struct {
int client_socket;
struct sockaddr_in cube_address;
snake_node_t **snake_head;
coord_t *food;
unsigned char *gameover;
pthread_mutex_t *draw_mutex;
pthread_cond_t *draw_condition_var;
} handle_render_params_t;
void *handle_render( handle_render_params_t * );
int mygetch( void );
#endif // MAIN_H_INCLUDED