Fully Working Game
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "network/networking.h"
|
||||
|
||||
#define NUM_OF_BALLS 2
|
||||
|
||||
|
||||
// Setup game board
|
||||
#define TOP_ROW 4
|
||||
@@ -19,6 +21,8 @@ typedef struct
|
||||
|
||||
} GameData;
|
||||
|
||||
long GetCurrentMS();
|
||||
|
||||
/**
|
||||
* Setups the curses terminal environment
|
||||
*/
|
||||
@@ -45,7 +49,7 @@ void DrawWalls(GameData);
|
||||
/**
|
||||
* Draws the scoreboard and header
|
||||
*/
|
||||
void DrawHeader(GameData);
|
||||
void DrawHeader(GameData* data, int* scores, int numOfBalls);
|
||||
|
||||
/**
|
||||
* Creates text at a location on screen
|
||||
|
||||
@@ -23,6 +23,8 @@ Server StartServer(int port);
|
||||
*/
|
||||
void RemoveClient(Server* s, int index);
|
||||
|
||||
void KillServer();
|
||||
|
||||
typedef struct {
|
||||
int client_fd;
|
||||
struct sockaddr_in address;
|
||||
|
||||
@@ -5,5 +5,12 @@
|
||||
#include "../object.h"
|
||||
|
||||
int ProcessBallPacket(char* msg, Ball* ball, GameData* gd);
|
||||
int ProcessAlert(char* msg);
|
||||
int ProcessGMSG(char* msg);
|
||||
int ProcessScore(char* msg, int* scores);
|
||||
int ProcessBallLost(char* msg, int fd, GameData* gd, int* scores, int* allowSever, int numOfBalls);
|
||||
int ProcessNumOfBalls(char* msg, int* numOfBalls);
|
||||
|
||||
void SendGameStatus(int fd, char* msg);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user