📄 use.txt
字号:
xmj, mj-server, mj-player - programs for playing Mah-JongSYNOPSIS-------- xmj [ --id IDNUMBER] [ --server ADDRESS] [ --name PLAYERNAME] [ --connect ] [ --show-wall | --no-show-wall ] [ --size N ] [ --animate ] [ --tileset DIRECTORY] [ --tileset-path DIRECTORY-PATH] [ --dialogs-popup | --dialogs-below | --dialogs-central ] [ --echo-server ] [ --pass-stdin ] mj-server [ --server ADDRESS] [ --timeout SECONDS] [ --pause DECISECONDS] [ --random-seats ] [ --disconnect-penalties N1,N2,N3] [ --end-on-disconnect ] [ --exit-on-disconnect ] [ --save-on-exit ] [ --option-file FILE] [ --debug ] [ --logfile FILE] [ --no-manager ] [ --no-special-scores ] [ --seed N ] [ --wallfile filefP] [ --nohist ] mj-player [ --id IDNUMBER] [ --name PLAYERNAME] [ --server ADDRESS] [UNDOCUMENTED OPTIONS] DESCRIPTION-----------A set of three programs to play Mah-Jong on Unix systems, againstpeople or programs, over the Internet. mj-server is the program that handles communications and control of the game; the rules and scoring are enforced there. Players, human or computer, connect to a server via the network. mj-player is a computer player. At present, it is fairly simplistic, having only offensive tactics with no knowledge of defensive play. xmj is the X client for human players. QUICK START-----------If you don't want to read this long document: to start a game againstthree computer players, start xmj , select "New local game..." from the "Game" menu, and click "Start Game". (Wait about ten seconds foreverything to start up.)OPTIONS-------All Programs------------ --server ADDRESS specifies the network address to listen on (for mj-server ) or to connect to (for mj-player and xmj ). If ADDRESS contains a colon, it specifies an Internet socket, and should have the form HOST:PORT . If ADDRESS does not contain a colon, it is interpreted as a Unix file name and a Unix socket is used. The default value for ADDRESS is localhost:5000 . ADDRESS can also be set in a dialog box in xmj . xmj and mj-player----------------- --id IDNUMBER The server assigns a unique integer ID (which is currently just 1 to 4 in order of connection) to each player. This ID should be quoted when reconnecting to a game in progress (after, for example, losing a network connection or accidentally killing xmj ). The default ID is 0, which denotes no pre-assigned ID. --name NAME Players can give themselves names which will be used by client programs. This option specifies the name. For xmj , the default is the value of the environment variable LOGNAME, or failing that the username of the logged in user. For mj-player , the default is "Robot(PID)" where PID is the process id. xmj--- --connect By default, xmj does not automatically connect to a server, but waits for the user to connect via a menu. If this option is specified, xmj immediately connects. --show-wall --no-show-wall Tells xmj (not) to display the wall. By default, the wall is shown only if running on a big enough screen. This option is also controllable via the Display Options preference panel. --size NUMBER This option adjusts the size of the main window. It should be thought of as the length of a tile rack, measured in tiles. The default, and the largest value accepted, is 19, or 18 if on an 800x600 display. The smallest usable value is 14. This is not yet changeable while the program is running, but since the programs correctly handle dis- and re-connecting in the middle of a game, this is not a major drawback. If the --show-wall option is given, a --size smaller than 19 will have no effect. --animate This option switches on some animation. Not all tile movements are animated: only those that involve moving tiles to or from a hand from outside. This option is also controllable via the Display Options preference panel. I'm not very keen on this; its main purpose is to draw attention to the tile being discarded or whatever. I welcome comments on whether it is liked, and whether it should be extended. --tileset DIRECTORY xmj needs pixmaps to display the tiles and the tong box. This option tells it which directory to find them in. The default is set at compilation time; the default default is to use the compiled-in tiles. --tileset-path DIRECTORY-PATH This gives a colon-separated (or semicolon-separated under Microsoft Windows) list of directories in which to look for the directory named by the --tileset option. --dialogs-popup By default, most of the dialog boxes for player actions are part of the main window. If this option is used, they will instead appear as separate transient windows. --dialogs-below By default, dialog boxes appear in the centre of the table. If this option is given, dialogs (apart from some popups) are positioned below the table area. Please let me know which style you prefer! --dialogs-central The default: dialog boxes appear in the middle of the table. These options are also controllable via the Display Options preference panel. --echo-server If this option is given, xmj will echo to stdout all the protocol messages received from the server. --pass-stdin If this option is given, xmj will send any text given on stdin to the server. mj-server--------- --timeout SECONDS When a discard is made, there is a limit on the time players have to claim it. This option sets the timeout; a value of zero disables it. The default is 15 seconds. --pause DECISECONDS This will make the server enforce a delay of DECISECONDS/10 seconds between each action in the game; the purpose is to slow programmed players down to human speed (or, in a teaching situation, to slow the game even more). The current server considers that 50 (i.e. 5 seconds) is the maximum reasonable value for this option. The option can also be requested by players, via a PlayerOption protocol request. --random-seats By default, players are seated in order of connection to the server. This option seats them randomly. It will become the default later. --disconnect-penalties N1,N2,N3 This specifies the penalties applied by the following option for players who disconnect before the end of a game. N1 is the penalty for disconnecting in the middle of a hand; N2 at the end of a hand but in the middle of a round; N3 at the end of a round (other than end of game). They all default to 0 if not specified. --end-on-disconnect If this option is given, a disconnection by one player will gracefully terminate the game. Mid-hand, the hand is declared a wash-out; after Mah-Jong has been declared, then if a losing player disconnects, their tiles are shown, the hand is scored, and then the game ends; if a winning player disconnects, the hand is a wash-out. The disconnecting player may be assigned a penalty, according to the --disconnect-penalties option, which will be included in the scores printed out by the server. (The penalties will not be visible to the other players.) --exit-on-disconnect If this option is given, the server will quit if any player disconnects, rather than waiting indefinitely for reconnection. --save-on-exit If this option is given, the server will save the state of the game if it quits as a result of a player disconnecting. (It will not save the state if it quits as the result of an internal error.) --option-file FILE This names a file of protocol commands which will be applied to every game when it starts. Its main purpose is to set non-default game options, via the GameOption protocol message (note that this is a CMsg, not a PMsg). However, users will normally set options and preferences via the xmj control panel, not by this means. --load-game FILE This names a file containing a saved game (as a suitable sequence of protocol commands). The server will load the game; clients connecting will be treated as if they had disconnected and rejoined the game. --no-id-required In the most common case of resuming a saved game, namely one human playing against three robots, the robots will not have the same names or ids as the robots in the original game. This option tells the server that if it cannot match a reconnecting player by id or name, it should anyway match it to one of the previously disconnected players. (In this case, the human normally connects first with the same name, so is correctly matched.) --no-manager Usually, the first player to connect becomes the game manager, and can change all the game settings. If this option is given, no player will be allowed to change the game settings. --debug This enables various debugging features. In particular, it enables protocol commands that allow one to change the tiles in a hand... --logfile FILE The server will write a complete record of the game to FILE; this will be quite large, and is only useful for automatic comparison of different computer players. --no-special-scores This option suppresses the scoring of points and doubles for flowers and seasons. It is primarily intended for running tests of different players; for human use, a game option will be provided to eliminate the specials altogether.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -