summaryrefslogtreecommitdiffstats
path: root/mbbsd/chc.c
Commit message (Collapse)AuthorAgeFilesLines
* - eliminate compile warningspiaip2008-03-111-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3991 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* * use strtok_r() instead of strtok(). fix bad strtok() usages.kcwu2007-06-191-2/+3
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3545 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Reversi (multiplayer othello) addedscw2007-05-301-3/+5
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3523 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* add article header for chess log. also hint user the replay log hotkey 'z'.kcwu2006-10-081-0/+3
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3442 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Fix chc machine readable log board initial state.scw2005-11-161-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3244 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* GO chess replay implementedscw2005-09-111-0/+3
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3155 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* GO convertion to chess frameworkscw2005-09-111-3/+4
| | | | | | | | | | | | | | * versus, personal and watching all work chess.c framework update * "pass" and "tie request" are distinguished * chess-specific key binding * post-game processing !!!NOTE!!! Chess protocals are NOT backward compatible RESTART WHOLE system to ensure correctness git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3153 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* pretty output of human readable chess log.kcwu2005-09-091-13/+15
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3144 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Gomoku log read errorscw2005-09-021-2/+6
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3125 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* * chc machine-readable log reflectedscw2005-09-011-2/+2
| | | | | | * chc replaying put red on bottom git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3123 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* chc replay display problemscw2005-08-301-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3119 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* write '[Result "*"]' for unknown status chc logscw2005-08-291-0/+2
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3110 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* chc machine readable log updatescw2005-08-291-10/+15
| | | | | | | * fix playing date * show result only when the game was completed git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3109 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* try using userec_t to initialize ChessUser when failed to get userinfo_tscw2005-08-281-0/+2
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3106 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Chess functions:scw2005-08-281-4/+156
| | | | | | | | | | | * chc machine readable log - http://www.elephantbase.net/protocol/cchess_pgn.htm - http://www.elephantbase.net/protocol/cchess_move.htm * chc and gomoku replay work * key binding 'z' in pmore() for chess replay * avoid crash when watching (the watchee's mateid is empty) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3105 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Fix SIGABRT when watching chc.scw2005-08-221-6/+7
| | | | | | | | Thanks to blackmajisha.bbs@ptt.cc and AMONAMON.bbs@ptt.cc for helping locating problem. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3072 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Wrong winner on rule-violating step.scw2005-08-201-4/+4
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3066 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Gomoku convertion to chess.c frameworkscw2005-08-151-123/+10
| | | | | | | | | | | | | | | * 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
* * fix crash when logging a tied chc gamescw2005-08-131-2/+4
| | | | | | | * confirming tying request in chess games git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3034 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* * fix chc watching SEGV bugscw2005-08-101-10/+8
| | | | | | | * chc.[ch] and chess.[ch] code clean up git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3022 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3018 ↵scw2005-08-091-5/+5
| | | | 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Fix r3015.scw2005-08-091-3/+12
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3017 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Correcting chc losing number when playing.scw2005-08-091-3/+6
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3015 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* use REDDOWN() macro to indicate chessboard flipping status.kcwu2005-08-091-11/+11
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3014 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* fix chess internal coordinate. kcwu2005-08-081-86/+96
| | | | | | !! NOTE !!, not compatible with older revision. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3009 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* New chess frameworkscw2005-08-081-1023/+374
| | | | | | | | | | | | | * Provides common parts of all chess games * Chinese chess fully ported * Improved watching * Leaving possibility to implement replaying !!!NOTE!!! Protocal not backward compatible, STOP ALL clients before upgrade. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3002 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* CHC message showing modified.scw2005-08-041-61/+67
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2976 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* CHC limited time mode rule update.scw2005-08-021-2/+5
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2975 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* CHC new restriction available.scw2005-08-011-18/+178
| | | | | | | | *NOTE* chc protocal changed withOUT backward compatibility. STOP mbbsd before upgrading. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2974 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Show time limit and turning info in chc when displaying photo.scw2005-07-161-3/+9
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2934 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* username -> nicknamepiaip2005-07-061-2/+2
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2902 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Photo on chinese chess for chess country.scw2005-07-061-35/+191
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2900 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* New style to specify ANSI escape commands.piaip2005-06-081-19/+19
| | | | | | | | | First introduced by pmore, but this hard work (to transform all files to new style) is made by Rong-en Fan (rafan). Thanks! git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2796 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* add 'const' qualifiers on function parameters.kcwu2005-03-191-12/+12
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2632 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* move global variable into localkcwu2005-03-121-195/+219
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2602 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* move global variable xuser into local, save 512 bytes.kcwu2005-03-121-2/+4
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2596 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* typokcwu2005-03-011-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2567 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* add code question commentkcwu2005-02-281-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2564 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Reenable Chinese chess watching.scw2005-02-261-16/+18
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2556 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* avoid use math library (-lm).kcwu2005-02-241-3/+25
| | | | | | | sanity check for result of elo rating git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2528 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* log outcome of chess playingkcwu2005-02-241-0/+12
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2527 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* bug fix: fix broadcast linklistkcwu2005-02-061-2/+2
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2475 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* * In generalnamecomplete(), complete as more as possible when space (' ')scw2005-02-051-5/+1
| | | | | | | | | | | | | | | is pressed. (As what <tab> does in most shell) * In all three completing functions (namecomplete, usercomplete and generalnamecomplete), return null string instead of partial matched name which makes users able to talk/annoy those they are not supposed to talk to (admins or cloaks). * Type of parameters of generalnamecomplete has typedefed and should be clearer. * New macro CompleteBoard and CompleteOnlineUser are defined since most of the usage of generalnamecomplete are the same. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2468 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* replace rand() with random() for better randomnesskcwu2005-02-041-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2460 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* treat lose and decrease chess rating if disconnectedkcwu2004-10-311-2/+5
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2301 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* fix chess piece name (wrong side)kcwu2004-10-241-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2276 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* fix move step linekcwu2004-10-191-57/+111
| | | | | | | | | step line display front or back piece only except pawn show red vs black fix log win/lose git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2268 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* rename global static variable "fp" to "chessfp"kcwu2004-10-181-9/+9
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2263 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* also update rating in ramkcwu2004-10-081-0/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2230 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* calculate chess ELO ratingkcwu2004-10-081-0/+33
| | | | | | | only show rating in debug mode now git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2228 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* big5 sucksvictor2004-10-061-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2225 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* remove unused uflag: MIND_FLAG, COLOR_FLAGvictor2004-10-061-20/+62
| | | | | | | disable chinese chess watching git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2224 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* merge back from branch victor.solarisvictor2004-09-101-4/+8
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2189 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* fix chc bug, but still buggyvictor2004-09-091-7/+13
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2184 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Add statistic program for angel.scw2004-06-201-0/+1
| | | | | | | fix some warning and add svn:keywords Id for several files. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2072 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* replace some prints() with outs(),kcwu2004-06-101-1/+1
| | | | | | | | | | | | replace some outs() with outc(), replace some fprintf() with fputs(), and so on. for performance. and don't treat user input as format string. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2055 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* use 'const' keyword to reduce 7904 bytes data segmentkcwu2004-06-041-5/+5
| | | | | | | from 9320 to 1416 git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2049 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* integrate igetkey igetch egetchptt2004-04-241-3/+3
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1828 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* revert the river namevictor2004-04-231-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1820 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* revert cuser from pointer to buffer.ptt2004-04-211-6/+6
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1798 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* chess rollbackptt2004-04-201-4/+2
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1795 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* chess -_-ptt2004-04-141-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1754 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* 1.change outs pressanykey -> vmsgptt2004-04-141-2/+4
| | | | | | | 2.secrete chess git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1751 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* Fix warning, including:scw2004-04-021-0/+4
| | | | | | | | | | Prototype differance of crypt() on linux. Adding _ISOC99_SOURCE to get declaration of snprintf() on linux. Including strings.h to get declaration of strcasecmp() on linux. Using mkstemp() instead of tempnam(). git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1679 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* refiningptt2004-03-311-1/+1
| | | | | | | | cuser & passwd_update git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1649 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* add mmap to cuser get ride of passwd_updateptt2004-03-311-6/+6
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1640 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* add mode CHESSWATCHINGvictor2003-10-141-1/+4
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1239 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* ask before watching a chc game.victor2003-09-281-0/+3
| | | | | | | fix wrong flow git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1208 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* fix bug - syntax errorvictor2003-09-131-1/+1
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1182 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* code auditkcwu2003-09-101-1/+2
| | | | git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1175 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
* merge chc from my branchvictor2003-09-091-0/+1030
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1170 63ad8ddf-47c3-0310-b6dd-a9e9d9715204