diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-15 14:26:17 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-15 14:26:17 +0800 |
commit | 98f0f5e0a45c6771ce43d69a13aa9b9ecce3faf9 (patch) | |
tree | 319ebe57c18b21b8f31c95cd92626163e472b7e2 /include | |
parent | 5936d5aa8dd56d023c8aa475ac0505406af88268 (diff) | |
download | pttbbs-98f0f5e0a45c6771ce43d69a13aa9b9ecce3faf9.tar pttbbs-98f0f5e0a45c6771ce43d69a13aa9b9ecce3faf9.tar.gz pttbbs-98f0f5e0a45c6771ce43d69a13aa9b9ecce3faf9.tar.bz2 pttbbs-98f0f5e0a45c6771ce43d69a13aa9b9ecce3faf9.tar.lz pttbbs-98f0f5e0a45c6771ce43d69a13aa9b9ecce3faf9.tar.xz pttbbs-98f0f5e0a45c6771ce43d69a13aa9b9ecce3faf9.tar.zst pttbbs-98f0f5e0a45c6771ce43d69a13aa9b9ecce3faf9.zip |
Gomoku convertion to chess.c framework
* versus, watching and personal playing
* undo function removed due to the restriction of
the framework currently
chess.c framework update
* resign confirm
* invited peer can be watched
!!!NOTE!!! Gomoku protocal not backward compatible
RESTART WHOLE system to ensure correctness
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3036 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r-- | include/chc.h | 15 | ||||
-rw-r--r-- | include/chess.h | 4 | ||||
-rw-r--r-- | include/gomo.h | 4 | ||||
-rw-r--r-- | include/proto.h | 5 |
4 files changed, 10 insertions, 18 deletions
diff --git a/include/chc.h b/include/chc.h index 900d4dd1..8b7fb23b 100644 --- a/include/chc.h +++ b/include/chc.h @@ -1,20 +1,6 @@ -#define SIDE_ROW 7 -#define REAL_TURN_ROW 8 -#define STEP_ROW 9 -#define REAL_TIME_ROW1 10 -#define REAL_TIME_ROW2 11 -#define REAL_WARN_ROW 13 -#define MYWIN_ROW 17 -#define HISWIN_ROW 18 - -#define PHOTO_TURN_ROW 19 -#define PHOTO_TIME_ROW1 20 -#define PHOTO_TIME_ROW2 21 -#define PHOTO_WARN_ROW 22 #define CHE_O(c) ((c) >> 3) #define CHE_P(c) ((c) & 7) -#define dim(x) (sizeof(x) / sizeof(x[0])) #define CHE(a, b) ((a) | ((b) << 3)) /* TODO let user flip chessboard */ #define REDDOWN(info) ((info)->myturn==RED) @@ -26,7 +12,6 @@ #define RED_COLOR ANSI_COLOR(1;31) #define BLACK_REVERSE ANSI_COLOR(1;37;46) #define RED_REVERSE ANSI_COLOR(1;37;41) -#define TURN_COLOR ANSI_COLOR(1;33) #define BRD_ROW 10 #define BRD_COL 9 diff --git a/include/chess.h b/include/chess.h index bf9443ce..a917efcc 100644 --- a/include/chess.h +++ b/include/chess.h @@ -143,6 +143,7 @@ typedef struct ChessConstants { int traditional_timeout; int board_height; int board_width; + const char *chess_name; const char *photo_file_name; const char *log_board; const char *turn_color[2]; @@ -180,4 +181,7 @@ void ChessEstablishRequest(int sock); void ChessAcceptingRequest(int sock); void ChessShowRequest(void); +void ChessDrawLine(const ChessInfo* info, int line); +void ChessDrawExtraInfo(const ChessInfo* info, int line); + #endif /* INCLUDE_CHESS_H */ diff --git a/include/gomo.h b/include/gomo.h index b1228ba8..b5e8d014 100644 --- a/include/gomo.h +++ b/include/gomo.h @@ -3,9 +3,9 @@ #ifndef _INCLUDE_GOMO_H #define _INCLUDE_GOMO_H -#define BBLANK (0) /* 空白 */ +#define BBLANK (-1) /* 空白 */ +#define BWHITE (0) /* 白子, 後手 */ #define BBLACK (1) /* 黑子, 先手 */ -#define BWHITE (2) /* 白子, 後手 */ #define MAX_TIME (300) /*最長idle秒數*/ #ifndef BRDSIZ #define BRDSIZ (15) /* 棋盤單邊大小 */ diff --git a/include/proto.h b/include/proto.h index c20be401..a39a65c7 100644 --- a/include/proto.h +++ b/include/proto.h @@ -293,7 +293,10 @@ int gochess(int fd); int GoBot(void); /* gomo */ -int gomoku(int fd); +void gomoku(int s, ChessGameMode mode); +int gomoku_main(void); +int gomoku_personal(void); +int gomoku_watch(void); /* guess */ int guess_main(void); |