Some Comments
This commit is contained in:
@@ -19,16 +19,41 @@ typedef struct
|
|||||||
|
|
||||||
} GameData;
|
} GameData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setups the curses terminal environment
|
||||||
|
*/
|
||||||
void SetupTermWin();
|
void SetupTermWin();
|
||||||
|
/**
|
||||||
|
* Cleans up the curses terminal environment
|
||||||
|
*/
|
||||||
void CloseTermWin();
|
void CloseTermWin();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the Game Server that is responsible for the Host's input and processing
|
||||||
|
*/
|
||||||
void CreateGameServer(Server* serv,GameData*gd);
|
void CreateGameServer(Server* serv,GameData*gd);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the Client game loop
|
||||||
|
*/
|
||||||
void RunGameClient(Client* c);
|
void RunGameClient(Client* c);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Draws the walls based on player 1 or 2
|
||||||
|
*/
|
||||||
void DrawWalls(GameData);
|
void DrawWalls(GameData);
|
||||||
|
/**
|
||||||
|
* Draws the scoreboard and header
|
||||||
|
*/
|
||||||
void DrawHeader(GameData);
|
void DrawHeader(GameData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates text at a location on screen
|
||||||
|
*/
|
||||||
void MGameAlert(int y, int x, char* str);
|
void MGameAlert(int y, int x, char* str);
|
||||||
|
/**
|
||||||
|
* Creates text at the top left of the screen for alerts
|
||||||
|
*/
|
||||||
void GameAlert(char* str);
|
void GameAlert(char* str);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -13,7 +13,14 @@ typedef struct {
|
|||||||
int client_count;
|
int client_count;
|
||||||
} Server;
|
} Server;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup the actual socket server
|
||||||
|
*/
|
||||||
Server StartServer(int port);
|
Server StartServer(int port);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes client and closes the connection
|
||||||
|
*/
|
||||||
void RemoveClient(Server* s, int index);
|
void RemoveClient(Server* s, int index);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -21,6 +28,9 @@ typedef struct {
|
|||||||
struct sockaddr_in address;
|
struct sockaddr_in address;
|
||||||
} Client;
|
} Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the Client object
|
||||||
|
*/
|
||||||
Client StartClient(char* host, int port);
|
Client StartClient(char* host, int port);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user