This commit is contained in:
Edi De Candido 2023-05-23 15:41:23 +02:00
parent 2aac2743cd
commit 8e4060bc99
7 changed files with 12 additions and 10 deletions

View File

@ -73,8 +73,8 @@ ARGSCLIENT2 := Molla
OPEN_NEW_TERMINAL := kitty
test: comp
$(OPEN_NEW_TERMINAL) $(MKFILE_DIR) $(TARGET2) $(ARGSCLIENT1)
$(OPEN_NEW_TERMINAL) $(MKFILE_DIR) $(TARGET2) $(ARGSCLIENT2)
$(OPEN_NEW_TERMINAL) $(MKFILE_DIR) $(TARGET2) $(ARGSCLIENT1) |\
$(OPEN_NEW_TERMINAL) $(MKFILE_DIR) $(TARGET2) $(ARGSCLIENT2) |\
./$(TARGET1) $(ARGSSERVER)
comp: server_c client_c

View File

@ -3,6 +3,8 @@
#include <structures.h>
int _SHMID;
int getShmid(int row, int col);
tile_t * shmServerAt(int shmid);
tile_t * shmClientAt(int shmid);

View File

@ -3,6 +3,8 @@
#define TIME_TO_RESET 2
pid_t _PIDS[2];
void sigHandlerServer(int sig);
void setupServerSignalHandler();

View File

@ -8,6 +8,8 @@
#define DIAGONAL _COLLUMS - 1
#define DIAGONAL_INV _COLLUMS + 1
tile_t *_BOARD;
// global variable
static int _ROWS;
static int _COLLUMS;

View File

@ -3,6 +3,8 @@
#include <structures.h>
input_server_t _INPUT_S;
input_server_t check_input(int argc, char *argv[]);
#endif

View File

@ -32,12 +32,4 @@ typedef enum {
PLAYER2
} tile_t;
int _SHMID;
tile_t *_BOARD;
pid_t _PIDS[2];
input_server_t _INPUT_S;
#endif

View File

@ -11,6 +11,8 @@
#include <errExit.h>
#include <custom_msgq.h>
#include <custom_sem.h>
#include <custom_shm.h>
#include <forza4.h>
static int sigint_count = 2;