-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessage.h
52 lines (52 loc) · 2.84 KB
/
message.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
const char* SERVER_START_DATA="START %d";
const char* CLIENT_READYSIGNAL="READY";
const char* PLACE_DATA="PLACE %d,%d";
const char* UNDO_REQUEST="UNDO_REQ";
const char* UNDO_ACCEPT="UNDO_YES";
const char* UNDO_DENIED="UNDO_NO";
const char* SURRENDER_SIGNAL="GIVEUP";
const char* MESSAGE_IDENTITY_BLACK="You're the BLACK(*)";
const char* MESSAGE_IDENTITY_WHITE="You're the WHITE(O)";
const char* MESSAGE_WAIT_BLACK="Wait BLACK(*) make the move...";
const char* MESSAGE_WAIT_WHITE="Wait WHITE(O) make the move...";
const char* MESSAGE_WAIT_YOU ="Wait your move... ";
const char* MESSAGE_WAIT_AI ="Wait AI move... ";
const char* MESSAGE_WAIT_SERVER_MOVE="Gobang - Wait server's move...";
const char* MESSAGE_WAIT_CLIENT_MOVE="Gobang - Wait client's move...";
const char* MESSAGE_BLACK_WIN="BLACK(*) WIN! ";
const char* MESSAGE_WHITE_WIN="WHITE(O) WIN! ";
const char* MESSAGE_YOU_WIN="Congratulations! You WIN!";
const char* MESSAGE_YOU_LOSE="Oh NO! You LOSE! Try again later :)";
const char* MESSAGE_UNDO_NOTHING="Nothing to Undo! ";
const char* MESSAGE_UNDO_OK="Undo OK! ";
const char* MESSAGE_UNDO_DENIED="Undo DENIED! ";
const char* MESSAGE_UNDO_REQUEST="The oppsite request to UNDO his move. \nDo you ACCEPT?";
const char* MESSAGE_ILLEGAL_MOVE="Illegal Move! ";
const char* MESSAGE_LASTMOVE_FORMAT="Last Move(%c): (%c,%c) ";
const char* MESSAGE_SURRENDERED="You have SURRENDERED!";
const char* MESSAGE_CONNECTION_ESTABLISHED="Connection established!";
const char* MESSAGE_ESTABLISHED_CONNECTION_WITH_CLIENT_FAILED="Fail to establish connection with client!";
const char* MESSAGE_CONNECTION_TIMEOUT="Connection timeout!";
const char* MESSAGE_STARTING_GAME="Starting Game...";
const char* MESSAGE_CLOUD_NOT_BIND_TO_PORT="Could not bind to port 5050!\nWould you want to retry?";
const char* MESSAGE_WAIT_CONNECTION="Waiting for connection...";
const char* MESSAGE_BIND_OK="Bind successfully!";
const char* MESSAGE_LISTENING="Listening on port 5050...";
const char* MESSAGE_FAILED_TO_CONNECT_SERVER="Failed to connect the server.\nWould you want to retry?";
const char* MESSAGE_UNKNOWN_OPTION="Unknown Option!";
const char* MESSAGE_ENTER_IPADDR="Enter server IP address:";
const char* TITLE_GOBANG="Gobang";
const char* TITLE_GOBANG_COORD_FORMAT="Gobang (%d,%d)";
const char* TITLE_GAMEOVER="Game Over";
const char* TITLE_ERROR="Error";
const char* TITLE_UNDO_REQUEST="UNDO REQUEST";
const char* BANNER_GOBANG="============Gobang============";
const int GAMEOVER_SIGNAL=0x00;
const int CONTINUE_SIGNAL=0x01;
const int UNDO_CLICK_SIGNAL=0xBB;
const int SURRENDER_CLICK_SIGNAL=0xAA;
const int GOBANG_CLIENT_MODE=1;
const int GOBANG_SERVER_MODE=0;
const int GOBANG_LOCAL_MODE=-1;
const int GOBANG_AI_MODE=0xFF;