Elaborato_SO/inc/structures.h

45 lines
710 B
C
Raw Permalink Normal View History

2023-05-21 12:04:34 +02:00
#ifndef STRUCTURES_H
#define STRUCTURES_H
#include <sys/types.h>
2023-05-22 11:03:36 +02:00
#define PSERVER "\033[34m<Server>\033[39m "
#define PCLIENT "\033[94m<Client>\033[39m "
#define PHELP "\033[92m<Help>\033[39m "
2023-05-29 11:37:43 +02:00
#define CLEAR 1
2023-06-17 12:05:56 +02:00
#define TIME_TO_MOVE 10
2023-06-17 10:45:51 +02:00
2023-05-21 12:04:34 +02:00
// semaphore
union semun {
int val;
struct semid_ds * buf;
unsigned short * array;
};
2023-05-22 10:07:57 +02:00
#define KEYFILE "./LICENSE"
2023-05-21 12:04:34 +02:00
// shared memory
#define SHMERR (void *)-1
typedef struct {
int collums;
int rows;
char player1Token;
char player2Token;
} input_server_t;
typedef enum {
EMPTY,
PLAYER1,
PLAYER2
} tile_t;
2023-06-18 16:13:05 +02:00
#endif
/************************************
*VR471576
*Lorenzo Bianchi
*16/06/2023
*************************************/