express mode as enum, fix some display issues, use switch for mode checks

This commit is contained in:
2026-03-19 22:44:29 -05:00
parent f947992b61
commit be5e928369
2 changed files with 35 additions and 17 deletions

View File

@@ -5,11 +5,13 @@
using namespace std;
typedef enum { NO_MODE = 0, SERVER_MODE = 1, CLIENT_MODE = 2 } chatmode_t;
extern chatmode_t mode;
extern const int PORT_NUM;
extern string IP_ADDRESS;
extern const int DEFAULT_CUR_X;
extern const int DEFAULT_CUR_Y;
extern int mode;
extern int serverSocketDescriptor;
extern int clientSocketDescriptor;
extern struct timeval start1, end1;