home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume14 / okbrdge2 / part02 < prev    next >
Encoding:
Internet Message Format  |  1993-01-26  |  54.1 KB

  1. Path: uunet!zephyr.ens.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v14i080:  okbridge2 - computer-mediated bridge game, Part02/14
  5. Message-ID: <3519@master.CNA.TEK.COM>
  6. Date: 7 Sep 92 21:41:07 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1311
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: mclegg@cs.UCSD.EDU (Matthew Clegg)
  12. Posting-number: Volume 14, Issue 80
  13. Archive-name: okbridge2/Part02
  14. Supersedes: okbridge: Volume 13, Issue 16-22
  15. Environment: BSD-derived Unix, NeXT, curses, sockets
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 2 (of 14)."
  26. # Contents:  README MANIFEST help.h okbridge.man
  27. # Wrapped by billr@saab on Mon Sep  7 14:33:35 1992
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'README' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'README'\"
  31. else
  32. echo shar: Extracting \"'README'\" \(3922 characters\)
  33. sed "s/^X//" >'README' <<'END_OF_FILE'
  34. X
  35. Xintro -- introduction to the okbridge program
  36. XMatthew Clegg.  August 1990.
  37. X
  38. X
  39. XGeneral Description
  40. X------- -----------
  41. X
  42. XThe okbridge program is an interactive computer-mediated bridge game.
  43. XIt allows four players at (not necessarily) different locations on the
  44. Xinternet to participate in a game of rubber or Chicago (duplicate)
  45. Xbridge.  The program handles the dealing, scoring and communication of
  46. Xbids and plays.  It is screen oriented, although the screen display is
  47. Xrather simplistic.
  48. X
  49. X
  50. XCopyright Notice
  51. X--------- ------
  52. X
  53. XCopyright (C) 1990-1992 by Matthew Clegg.  All Rights Reserved
  54. X
  55. XOKbridge is made available as a free service to the Internet.
  56. XAccordingly, the following restrictions are placed on its use:
  57. X
  58. X1.  OKbridge may not be modified in any way without the explicit 
  59. X    permission of Matthew Clegg.  
  60. X
  61. X2.  OKbridge may not be used in any way for commercial advantage.
  62. X    It may not be placed on for-profit networks or on for-profit
  63. X    computer systems.  It may not be bundled as part of a package
  64. X    or service provided by a for-profit organization.
  65. X
  66. XIf you have questions about restrictions on the use of OKbridge,
  67. Xwrite to mclegg@cs.ucsd.edu.
  68. X
  69. XDISCLAIMER:  The user of OKbridge accepts full responsibility for any
  70. Xdamage which may be caused by OKbridge.
  71. X
  72. X
  73. X
  74. X
  75. XSystem Requirements
  76. X------ ------------
  77. X
  78. XThe program has been compiled and tested on a few SUN and VAX systems
  79. Xrunning derivatives of BSD UNIX.  The okbridge program uses the
  80. X"curses" library, which is available at most sites.  It also requires
  81. Xthat the machine on which it is running be an internet site.  If you
  82. Xobtained this software through the use of the 'ftp' program, then your
  83. Xmachine is probably an internet site.  The source code is written in
  84. Xthe C programming language.
  85. X
  86. X
  87. XHistory
  88. X-------
  89. X
  90. XMy interest in bridge began as an undergraduate at the University of
  91. XCalifornia, Riverside, where I learned the game.  After some time, I
  92. Xended up in Berkeley :-), while one of my best bridge-playing friends
  93. Xsomehow wound up stuck in Oklahoma :-(.  But then a bridge program was
  94. Xdiscovered archived somewhere on the net, and we happily continued
  95. Xplaying.  When I later moved to Finland (my wife is Finnish :-), it
  96. Xbecame impossible to use this program anymore.  So, I set out to write
  97. Xa new bridge program which would correct the deficiencies of the old one.
  98. X
  99. XThe old bridge program was quite inspirational, but it was also rather
  100. Xidiosyncratic.  Perhaps the difficulties with it can best be described
  101. Xby the authors themselves:
  102. X
  103. X        This program provides communication between different
  104. X        machines so that people can play bridge even they are
  105. X        on different machine.  It is written by Shyan-Ming
  106. X        Yuan and Jiang-Hsing Chu at University of Maryland,
  107. X        College Park.  It was tested on Vaxes and Sun 3/50
  108. X        running BSD 4.2 and BSD 4.3.  Since we don't have the
  109. X        previlege to create a 'bridge daemon' as a normal
  110. X        user, we decided to use 'talk daemon' instead.  The
  111. X        underlying communication program is modified from the
  112. X        'talk' program.  You will have confusion in trying to
  113. X        connect to the others...
  114. X
  115. XIn particular, we found that the talk daemons on various systems were
  116. Xoften incompatible.  So it was only possible for us to play when all
  117. Xfour of us logged onto a single machine via telnet.  In writing the
  118. Xnew program, I have abandoned the use of the 'talk daemon' in favor of
  119. Xestablishing the network connections directly through operating system
  120. Xcalls.  This has the advantage that it is universally standardized and
  121. Xperhaps faster and more reliable.  Also, the user interface for the
  122. Xold program was very unforgiving.  I have tried to correct this
  123. Xdeficiency too.
  124. X
  125. X
  126. X
  127. XFurther Documentation
  128. X------- -------------
  129. X
  130. XREADME.Install 
  131. X  Instructions about how to compile and install the program on your system.
  132. X
  133. XREADME.Playing
  134. X  Instructions about how to operate the program.
  135. END_OF_FILE
  136. if test 3922 -ne `wc -c <'README'`; then
  137.     echo shar: \"'README'\" unpacked with wrong size!
  138. fi
  139. # end of 'README'
  140. fi
  141. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  142.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  143. else
  144. echo shar: Extracting \"'MANIFEST'\" \(1881 characters\)
  145. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  146. X   File Name        Archive #    Description
  147. X-----------------------------------------------------------
  148. X COPYRIGHT                 14    
  149. X MANIFEST                   2    This shipping list
  150. X Makefile                  12    
  151. X MkDistrib                  7    
  152. X README                     2    
  153. X README.Install             1    
  154. X README.Playing             1    
  155. X Revisions                 14    
  156. X WhatsNew                  10    
  157. X boards.c                   5    
  158. X boards.h                  11    
  159. X bridge.c                   3    
  160. X ccdef.c                   12    
  161. X cipher.c                  12    
  162. X cipher.h                  14    
  163. X commands.c                 4    
  164. X commands.h                 9    
  165. X conversation.c            10    
  166. X conversation.h            14    
  167. X cs.c                       6    
  168. X cs.h                      14    
  169. X display.c                  6    
  170. X display.h                 12    
  171. X fds.h                     14    
  172. X gps.c                      8    
  173. X gps.h                     13    
  174. X gps_info.h                13    
  175. X help.c                    12    
  176. X help.h                     2    
  177. X input.c                    8    
  178. X input.h                   13    
  179. X log.c                     10    
  180. X log.h                     14    
  181. X network.c                  7    
  182. X network.h                  5    
  183. X nonstd.c                  14    
  184. X okbridge.help              9    
  185. X okbridge.man               2    
  186. X okbridgerc                13    
  187. X okshuffle.c               13    
  188. X okshuffle.man             14    
  189. X oktally.c                 10    
  190. X oktally.man                1    
  191. X parser.c                  11    
  192. X parser.h                  11    
  193. X protocol.c                 9    
  194. X protocol.h                 7    
  195. X rc.c                      11    
  196. X rc.h                       4    
  197. X scoring.c                 12    
  198. X scoring.h                 13    
  199. X socket.c                  13    
  200. X socket.h                  13    
  201. X state.h                   13    
  202. X terminal.c                13    
  203. X terminal.h                13    
  204. X types.h                   11    
  205. END_OF_FILE
  206. if test 1881 -ne `wc -c <'MANIFEST'`; then
  207.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  208. fi
  209. # end of 'MANIFEST'
  210. fi
  211. if test -f 'help.h' -a "${1}" != "-c" ; then 
  212.   echo shar: Will not clobber existing file \"'help.h'\"
  213. else
  214. echo shar: Extracting \"'help.h'\" \(3186 characters\)
  215. sed "s/^X//" >'help.h' <<'END_OF_FILE'
  216. X/* help.h -- help functions for the bridge program.
  217. X *
  218. X ! Copyright (C) 1990-1992 by Matthew Clegg.  All Rights Reserved
  219. X ! 
  220. X ! OKbridge is made available as a free service to the Internet.
  221. X ! Accordingly, the following restrictions are placed on its use:
  222. X ! 
  223. X ! 1.  OKbridge may not be modified in any way without the explicit 
  224. X !     permission of Matthew Clegg.  
  225. X ! 
  226. X ! 2.  OKbridge may not be used in any way for commercial advantage.
  227. X !     It may not be placed on for-profit networks or on for-profit
  228. X !     computer systems.  It may not be bundled as part of a package
  229. X !     or service provided by a for-profit organization.
  230. X ! 
  231. X ! If you have questions about restrictions on the use of OKbridge,
  232. X ! write to mclegg@cs.ucsd.edu.
  233. X ! 
  234. X ! DISCLAIMER:  The user of OKbridge accepts full responsibility for any
  235. X ! damage which may be caused by OKbridge.
  236. X *
  237. X * This file contains the interface for a help procedure for the
  238. X * bridge program.  The help function is organized as a series of topics,
  239. X * headed by a main topic.  All of the help information is stored in a
  240. X * single file, organized as a list of topics.  The first entry in the
  241. X * file is interpreted to be the main topic, i.e., it is the entry which
  242. X * is displayed if no particular keyword is given.  Each topic entry
  243. X * has a header line which contains an identifying keyword and a 
  244. X * descriptive phrase.  This is followed by the body of the entry
  245. X * and is terminated by an end-of-entry line.  The format of the header
  246. X * line is simply
  247. X *  <keyword> <phrase>
  248. X * where <keyword> is any text string not containing white space characters.
  249. X * The body of the entry consists simply of a series of text lines.
  250. X * These are displayed in order on the screen.  However, a line beginning
  251. X * with the circumflex '^' character is displayed at the beginning of a
  252. X * new page.  A help entry is terminated by a line containing just the
  253. X * two characters '--'.  The last entry in the file need not have this
  254. X * terminator.  The help file may also contain comment lines.  These
  255. X * begin with the pound sign '#' character.
  256. X */
  257. Xextern initialize_help_system ();
  258. X/* Called once at the beginning of the program to read the file of help
  259. X * topics.
  260. X */
  261. Xextern int display_help ();
  262. X/* void display_help (char *topic); */
  263. X/* Displays help on the given topic.  This consists of looking up the
  264. X * help file associated to this topic and displaying the contents of this
  265. X * file on the screen.  If the topic string is empty, then displays first
  266. X * the contents of the main topic file.  Returns 0 if the requested topic
  267. X * was found, and 1 otherwise.
  268. X */
  269. Xextern void browse_help ();
  270. X/* void browse_help (char *name); */
  271. X/* Displays help on the given topic.  Afterwards, displays a list of
  272. X * topics along with a request to enter the name of a new topic.
  273. X */
  274. X
  275. Xextern void display_topics ();
  276. X/* void display_topics (char *header_message); */
  277. X/* Displays the list of help topics. */
  278. X
  279. Xextern void Refresh_Help_Display ();
  280. X/* void Refresh_Help_Display (void); */
  281. X/* Redisplays the current screen of help information. */
  282. X
  283. Xextern void Clear_Help_Display ();
  284. X/* void Clear_Help_Display (void); */
  285. X/* Returns the help system to its initial state. */
  286. END_OF_FILE
  287. if test 3186 -ne `wc -c <'help.h'`; then
  288.     echo shar: \"'help.h'\" unpacked with wrong size!
  289. fi
  290. # end of 'help.h'
  291. fi
  292. if test -f 'okbridge.man' -a "${1}" != "-c" ; then 
  293.   echo shar: Will not clobber existing file \"'okbridge.man'\"
  294. else
  295. echo shar: Extracting \"'okbridge.man'\" \(42256 characters\)
  296. sed "s/^X//" >'okbridge.man' <<'END_OF_FILE'
  297. X.\"
  298. X.\" Adapted from README.Playing -- how to operate the okbridge program
  299. X.\" Matthew Clegg.  September 1990.  Updated May 1991, March 1992, May 1992.
  300. X.\"
  301. X.TH "OKBRIDGE" 6 "4 Aug 1992"
  302. X.SH NAME
  303. Xokbridge \- multi-player networked bridge game
  304. X.SH SYNPOSIS
  305. X.na
  306. X.in +9n
  307. X.ti -9n
  308. Xokbridge
  309. X.I position name server
  310. X[\fB\-dimR\fP]
  311. X[\fB\-p\fP\ \fIportno\fP]
  312. X[\fB\-G\fP]
  313. X[\fB\-r\fP\ \fIreplay\-file\fP]
  314. X[\fB\-b\fP\ \fIboards\-file\fP]
  315. X[\fB\-L\fP\ \fIlogfile\fP]
  316. X[\fB\-pn, -pe, -ps, -pw\fP]
  317. X[\fB\-n\fP\ \fIplayer-name\fP]
  318. X[\fB\-s\fP\ \fIserver-name\fP]
  319. X.in -9n
  320. X.ad
  321. X.SH OPTIONS
  322. X.IP "\fIposition\fP"
  323. XA position-dependent parameter which specifies the seat 
  324. X(north, south, east or west) which the local player wishes to occupy.
  325. XThe \fIposition\fP should be specified as the first letter of the
  326. Xname of the seat (n, s, e or w).
  327. X.IP "\fIname\fP"
  328. XA position-dependent parameter which specifies the name by which 
  329. Xthe local player would like to be identified
  330. Xto other bridge players.  This name may be up to eight characters long.
  331. XIf it is omitted, then the login name is used.
  332. X.IP "\fIserver\fP"
  333. XA position-dependent parameter which specifies the Internet name 
  334. Xor number where the server will be running.
  335. XIf the local player wishes to be the server, then the word "me" may be
  336. Xused as the server name.
  337. X.IP "\fB-d\fP, \fB-i\fP, \fB-m\fP, \fB-R\fP"
  338. XIndicate that the playing and scoring conventions respectively for
  339. XDuplicate, IMP, Match point or Rubber bridge should be used.  
  340. XThese parameters are only relevant for the player
  341. Xwho is the server.  In other words, the server makes the decision
  342. Xfor everyone about the scoring convention that will be used.
  343. XIf this parameter is omitted, then the playing and scoring conventions
  344. Xwill default to those of rubber bridge.  The -R parameter is suppplied
  345. Xfor the sake of overriding any default which may appear in the .okbridgerc 
  346. Xfile.
  347. X.IP "\fB-p\fP \fIportno\fP"
  348. XSpecifies the port number which will be used for establishing the
  349. Xnetwork connections.  It is only in unusual circumstances that this
  350. Xparameter need be specified.
  351. X.IP "\fB-G\fP"
  352. XSpecifies that the Global Player Service (GPS) should \fInot\fP be contacted.
  353. XSee below for a description of the Global Player Service.
  354. X.IP "\fB-b\fP \fIboards-file\fP"
  355. XSpecifies that the file \fIboards-file\fP contains a sequence of
  356. Xduplicate deals which should be played.  This is equivalent to the LOAD 
  357. Xcommand in the .okbridgerc file.  See the description of email duplicate
  358. Xbridge below.
  359. X.IP "\fB-L\fP \fIlogfile\fP"
  360. XSpecifies the name of the file to which the results of play will be
  361. Xwritten.  This is equivalent to the LOG command in the .okbridgerc file.
  362. X.IP "\fB-z#\fP \fI[zhang-logfile]\fP"
  363. XSpecifes an alternate log file which will be recorded in the format
  364. Xdeveloped by Shangyou Zhang.  The character '#' should be replaced by
  365. Xa table number.  If the name of the file is omitted, then the name
  366. X"okb_#_rec" will be used.
  367. X.IP "\fB-pn, -pe, -ps, -pw\fP"
  368. XA position-independent parameter for specifying the player's position.
  369. X.IP "\fB-n\fP \fIplayer-name\fP"
  370. XA position-independent parameter for specifying the player's name.
  371. X.IP "\fB-s\fP \fIserver-name\fP"
  372. XA position-independent parameter for specifying the location of
  373. Xthe server.  If the server-name is given as "me", then the local
  374. Xplayer will be the server.
  375. X.SH "PLAYING"
  376. X.PP
  377. X.SH "The Okbridge Milieu"
  378. X.PP
  379. XOkbridge allows people to play bridge together using the Internet.
  380. XIt is a distributed program, which means that each player runs a
  381. Xseparate instance of the program, and these instances communicate
  382. Xwith each other through the Internet to cooperatively provide the
  383. Xillusion of a bridge game.  
  384. X.PP
  385. XAt any given moment, there may be many bridge tables currently open,
  386. Xwith players at these tables playing bridge together.  Each table
  387. Xallows four people to play bridge together.  There may be a number of
  388. Xadditional people at a table who are observing the play.  Each table
  389. Xhas a host, who is called the \fIserver\fP.  While the server is hosting the
  390. Xtable, the table is said to be \fIopen\fP.  The server can be either
  391. Xobserving or playing.  A player who is not a server is said to
  392. Xbe a \fIclient\fP.
  393. X.PP
  394. XA list of currently open bridge tables is maintained in a worldwide
  395. Xdatabase called the Global Player Service (GPS).  When a new player
  396. Xstarts the okbridge program, the GPS is contacted and the list of
  397. Xcurrently open bridge tables is displayed.  The player then has a
  398. Xchoice of either joining one of the currently open tables or hosting a
  399. Xnew table.
  400. X.PP
  401. XWhen four players have joined a table, they must choose \fIseats\fP before
  402. Xthey can begin play.  The seats are labeled north, south, east and
  403. Xwest, and a player chooses a seat by using one of the commands:
  404. X/NORTH, /SOUTH, /EAST or /WEST (see the list of commands below).
  405. XAlso, the server may choose one of several scoring modes (see below).
  406. XPlay can begin once the seats are all occupied.
  407. X.PP
  408. XIn addition to playing bridge together, the players at a table may
  409. Xtalk with each other and find out a limited amount of information
  410. Xabout each other (see the /WHO and /WHOIS commands below).  There are
  411. Xa number of options for controlling the format of the display and
  412. Xinput, see e.g., the /BELL, /DEFAULT, /FORMAL, /PROMPT, and /SPEC
  413. Xcommands.  Okbridge provides for very elementary convention
  414. Xcards (see the /CC and /CCDEF commands below), and it provides some
  415. Xsupport for duplicate play (also discussed below).
  416. X
  417. X.SH "Invoking the okbridge Program"
  418. XUsually, it is sufficient to start okbridge simply
  419. Xby typing one of the following two commands:
  420. X.IP okbridge
  421. X.IP "okbridge -n your-name"
  422. X.PP
  423. XThis will contact the Global Player Service for a list of the currently
  424. Xplaying tables.  The /JOIN (or /CONNECT) command can the be used to join
  425. Xan open table, or the /SERVE command can be used to begin serving a
  426. Xnew table.
  427. X.PP
  428. XHowever, if a game has been arranged in advance, then it is possible
  429. Xto specify explicitly the name of the server and the seat arrangement.
  430. XSuppose that the names of the players are Alex,
  431. XBob, Cathy and Dot.  Alex and Cathy will be one team, while Bob and Dot
  432. Xwill be the other.  They decide that Alex will be north, and Bob will be
  433. Xeast.  Further, they decide that Bob will be the server.  Here is a
  434. Xlist of the commands that each might use to invoke the okbridge program
  435. Xon their respective (hypothetical) machines:
  436. X
  437. X.nf
  438. X.na
  439. X Name    Position  Machine         Command to invoke okbridge
  440. X ----    --------  -------         --------------------------
  441. X Alex    north     a.alaska.edu    okbridge n Alex b.berkeley.edu
  442. X Bob     east      b.berkeley.edu  okbridge e Bob me
  443. X Cathy   south     c.florida.edu   okbridge s Cathy b.berkeley.edu
  444. X Dot     west      d.maine.edu     okbridge w Dot b.berkeley.edu
  445. X.ad
  446. X.fi
  447. X
  448. XThe server (in this case, Bob) should initiate his copy of the program
  449. Xfirst.  When a client starts her copy of the program, an initial
  450. Xdisplay will be presented and the program will attempt to establish a
  451. Xconnection to the server.  During this time, the keyboard will be
  452. Xunresponsive.  If the client is unable to establish the connection
  453. Xwithin 15-30 seconds, then it will give up and display an error
  454. Xmessage.  After the connection is established, the program will enter
  455. Xa talk mode where messages can be exchanged with the other players.
  456. X.PP
  457. XWhen the server deals the first hand, each player's screen will be
  458. Xredrawn, showing his or her cards.  The program prompts each player
  459. Xfor bids and broadcasts the bids to the other players.  After the
  460. Xbidding is complete, playing mode is entered.  The screen is redrawn
  461. Xin preparation for play.  Again, the program prompts each player for
  462. Xplays and broadcasts the plays to the others.  After the playing is
  463. Xcomplete, a review of the hand is presented to all of the players and
  464. Xthe scores are updated.  During this time, the players may freely
  465. Xdiscuss the hand.  Pressing RETURN twice in succession proceeds to the
  466. Xnext hand.  The program continues in this cycle indefinitely until a
  467. Xplayer leaves or until the server gives instructions which alter the
  468. Xbehavior of the program.
  469. X.PP
  470. XOther clients may join the table at any time.  A client who joins
  471. Xwhile a hand is in progress will be able to observe the play and so
  472. Xthe client is said to be an \fIobserver\fP.  The observer may choose
  473. Xto see the cards of the players by becoming a \fIspectator\fP (see the
  474. X/SPEC command below).  Spectators are not allowed to talk to the
  475. Xplayers, though.  If one of the players vacates his or her position,
  476. Xthen an observer may take the position.
  477. X
  478. X.SH "The Display and Entering Input"
  479. X.PP
  480. XHere we give an example of the screen display during bidding.  The numbers
  481. Xin the left column do not actually appear on the screen -- they are given
  482. Xfor reference purposes only.
  483. X
  484. X.nf
  485. X.na
  486. X   =======================================================================
  487. X 1 OKBRIDGE 1.6A WEST                                         THEY      WE
  488. X 2 HAND 1    (0:42)                                          -----   -----
  489. X 3 (S) Cathy's BID                                   TRICKS      0       0
  490. X 4                                                   VUL        NO      NO
  491. X 5      Alex     Bob      Cathy    Dot    |Cathy     ABOVE       0       0
  492. X 6      ----     ---      -----    ---    |-----     BELOW       0       0
  493. X 7   1  1S       --                       |S A652
  494. X 8                                        |H K754
  495. X 9                                        |D JT8
  496. X10                                        |C J3
  497. X11  
  498. X12  
  499. X13 
  500. X14 
  501. X15 
  502. X16 BID    2s
  503. X17 TALK
  504. X18  
  505. X19 -----------------------------------------------------------------------
  506. X20 |MODERATOR: TYPE /HELP FOR INSTRUCTIONS ABOUT THIS PROGRAM            |
  507. X21 |NETWORK- YOU ARE NOW SITTING AS WEST.                                |
  508. X22 |NETWORK- Alex HAS JOINED THE GAME AS NORTH                           |
  509. X23 |NETWORK- Cathy HAS JOINED THE GAME AS SOUTH                          |
  510. X24 |NETWORK- Bob HAS JOINED THE GAME AS EAST                             |
  511. X   =======================================================================
  512. X.ad
  513. X.fi
  514. X
  515. XIn the upper right corner of the screen (lines 1-6), the scores are
  516. Xdisplayed.  The number of tricks taken by each side is displayed on
  517. Xline 3.  The points above and below the line for each side are displayed
  518. Xon lines 5 and 6, respectively.  And an indication of which sides are
  519. Xvulnerable is displayed on line 4.  It has been pointed out to me that
  520. Xduring ordinary bridge play, the scores are only available to the players
  521. Xbetween hands and not during the bidding and playing.  I apologize that
  522. Xthe okbridge program is not faithful to the real game in this respect.
  523. X.PP
  524. XAt the beginning of line 2, we can see that this is the first hand
  525. Xbeing played at that so far 42 seconds have elapsed in the play of the
  526. Xhand.  On line 3, we can see that it is now Cathy's turn to bid.  On
  527. Xlines 5-9, we can see the bids that have been made up to this point.
  528. XThe display shows that Alex has bid 1 spade, while Bob has passed.
  529. XCathy's cards are displayed to the right of this table of bids.
  530. X.PP
  531. XLine 16 is the place where the local player's input to the program is
  532. Xentered.  The word `BID' at the lefthand margin is printed by the program
  533. Xand indicates that the program is expecting Cathy to type her bid.
  534. XThe characters `2s' were entered by Cathy, and they indicate that she
  535. Xintends to bid 2 Spades.  At the time this screen was copied, the
  536. Xcursor was located just to the right of the letter `s' in `2s'.
  537. XIf Cathy now presses the return key, then the bid 2 Spades will be
  538. Xtransmitted to the other players.
  539. X.PP
  540. XLine 17 is the line where the local player may type messages which will
  541. Xbe transmitted to the other players.  When the cursor is on line 17,
  542. Xany input that the user types will be transmitted to the other players
  543. Xas a conversational message.
  544. XThe user may switch between playing and talking by pressing the tab key.
  545. X.PP
  546. XLines 20 through 24 display messages from the program and from other
  547. Xplayers.  Each message is of the form `source: text', where `source'
  548. Xis either MODERATOR or the name of one of the players.  Messages from
  549. Xthe MODERATOR give information about the internal state of the program.
  550. X.PP
  551. XWhen entering input, the backspace and delete keys will erase the last
  552. Xcharacter typed.  The escape key erases the entire input line.  And
  553. Xpressing control-R causes the entire screen to be redrawn from scratch.
  554. XAlways press return to have your input transmitted to the other players.
  555. X.PP
  556. XThere is a `default' input option embedded in the input processor.
  557. XWhen the input line is empty, pressing return results in the display
  558. Xof a `default' input.  When in bidding mode, the default input is
  559. Xalways `pass'.  When in playing mode, the default input is the lowest
  560. Xranked card which follows suit.  If there are two or more suits from
  561. Xwhich a card may be played, then no default is made available.
  562. XPressing return a second time (i.e., after
  563. Xthe default input has been displayed) causes the default input to be
  564. Xtransmitted to the other players.  Sometimes in playing mode there is
  565. Xonly one legal input.  In this case, this input is displayed
  566. Xautomatically -- you need only press return to transmit it to the
  567. Xother players.
  568. X.PP
  569. XIn addition, there are a number of control keys which have been
  570. Xprogrammed to provide abbreviations for commands:
  571. X
  572. X.nf
  573. X.na
  574. X ^A   Alerts partner's last bid.
  575. X ^B   When used during the play of a hand, the bidding is displayed
  576. X      for review.
  577. X ^C   Quits the program.  (Confirmation is first requested.)
  578. X ^D   Toggles the default input mode.  See the /DEFAULT command.
  579. X ^G   Toggles the bell.  See the /BELL command.
  580. X ^P   Toggles the prompt.  See the /PROMPT command.
  581. X ^R   Refreshes the screen.
  582. X ^T   Switches between talking and playing.
  583. X ^U   Erases the current input.
  584. X ^W   Sends a wakeup signal to your partner.
  585. X ^X   Exits the program immediately (only if compiled in debug mode).
  586. X
  587. X TAB  Switches between talking and playing (same as ^T).
  588. X.ad
  589. X.fi
  590. X
  591. X.SH "Bidding"
  592. X.PP
  593. XA contract bid is specified by giving the level and the trump suit.
  594. XThe level is given as an integer in the range 1-7, while the trump
  595. Xsuits are of course clubs, diamonds, hearts, spades and no trump. 
  596. XHowever, the name of the trump suit is abbreviated to its initial
  597. Xletter.  Thus, here are some examples of legal contract bids:
  598. X.IP  "1c, 1d, 1h, 1s, 1n, 2c, 2d, 2h, 2s, 2n, 3c, 3d, 3h, 3s, 3n, ..."
  599. X.IP  "A passing bid is given by entering `pass' or just `p'."
  600. X.IP  "A doubling bid is given by entering `double' or `X'."
  601. X.IP  "A redoubling bid is given by entering `redouble' or `XX'."
  602. X.PP
  603. XA bidder may alert his or her bid by typing an exclamation point
  604. Xafter the bid (e.g., 1c!).  This alert is broadcast to the opponents
  605. Xbut not to the partner of the alerting bidder.  Alternatively, the
  606. Xpartner of the bidder may alert the bid by using the /ALERT command
  607. Xor the control-A key.  See the /ALERT command below.
  608. X
  609. X.SH "Playing"
  610. X.PP
  611. XThe name of a card is specified by giving its suit and then its rank.
  612. XThe honor cards `ten', `jack', `queen', `king' and `ace' are
  613. Xabbreviated respectively to T, J, Q, K and A.  Thus, the cards in
  614. Xthe deck are enumerated as
  615. X
  616. X.nf
  617. X.na
  618. X    C2, C3, C4, C5, C6, C7, C8, C9, CT, CJ, CQ, CK, CA
  619. X    D2, D3, D4, D5, D6, D7, D8, D9, DT, DJ, DQ, DK, DA
  620. X    H2, H3, H4, H5, H6, H7, H8, H9, HT, HJ, HQ, HK, HA
  621. X    S2, S3, S4, S5, S6, S7, S8, S9, ST, SJ, SQ, SK, SA
  622. X.ad
  623. X.fi
  624. X
  625. XIt is allowable to write the rank first and then the suit, e.g., TC
  626. Xinstead of CT.
  627. X
  628. X.SH Commands
  629. X.PP
  630. XThere are a number of special commands that are available in the okbridge
  631. Xprogram.  These special commands are invoked by entering at the beginning
  632. Xof a line a slash `/', the name of the command, and perhaps some
  633. Xparameters.  Here is a brief list of the available commands:
  634. X
  635. X.IP "/ALERT"
  636. XAlerts your partner's last bid.  If you are playing in FORMAL mode,
  637. Xthe alert is displayed to your opponents only.  Otherwise, the alert
  638. Xwill be displayed to everyone.  Same as ^A.
  639. X
  640. X.IP "/AUTOPASS [ON|OFF]"
  641. XDuring \fIPractice\fP mode, this command controls whether or not PASS bids
  642. Xare automatically supplied by the moderator for absent players.  See the
  643. Xdescription of \fIPractice\fP mode below.
  644. X
  645. X.IP "/BELL [ON|OFF]"
  646. XBy default, the okbridge program rings the terminal's bell whenever
  647. Xit requests input from you.  However, this can be disabled by
  648. Xtyping /BELL OFF.  The state of the bell can be toggled with ^G.
  649. X
  650. X.IP "/CC [NS|EW|MY|BOTH]"
  651. XDisplays the convention card of the specified team(s).
  652. XBy default, displays the convention card of the opponents.
  653. X
  654. X.IP "/CCDEF [<Convention Card Name>] [<Convention-Card>]"
  655. XStores or displays a named convention card in the internal database.
  656. XIf both parameters are omitted, then displays all of the named 
  657. Xconvention cards.  If only the name of the convention card is
  658. Xspecified, then displays that convention card.  Otherwise,
  659. Xenters a new definition for a named convention card.
  660. X
  661. X.IP "/CLAIM [\fIn\fP]"
  662. XThis command claims \fIn\fP additional tricks for the declarer.
  663. XIf \fIn\fP is omitted, then all remaining tricks are claimed.
  664. XIf \fIn\fP is negative, then this many -\fIn\fP tricks are conceded.
  665. XAll hands are revealed to the defenders, and they are asked whether
  666. Xor not they agree to the declarer's request.
  667. XIf both agree, then the hand is ended early.  This command can
  668. Xbe used only by the declarer.
  669. X
  670. X.IP "/CLS"
  671. XClears all of the messages from the talk area of the display.
  672. X
  673. X.IP "/DEFAULT [ON | OFF]"
  674. XThis command controls whether or not defaults will be provided
  675. Xfor bids, plays and questions.  This mode can be toggled with ^D.
  676. X
  677. X.IP "/EMAIL <your-email-address>"
  678. XSpecifies your email address.  Other players will then be able to
  679. Xfind out your email address by using the /WHOIS command.
  680. X
  681. X.IP "/FULLNAME <your-full-name>"
  682. XSpecifies your full name.  Other players will then be able to find
  683. Xout your name by using the /WHOIS command.  This name is also displayed
  684. Xby the GPS.
  685. X
  686. X.IP "/HELP [topic]"
  687. XProvides help about how to use Okbridge.
  688. XType /HELP alone to obtain general help.
  689. X
  690. X.IP "/LHB <message>"
  691. XSends a message to the person who appears to the left of you in the
  692. Xbidding display.  Same as the /RHO command.
  693. X
  694. X.IP "/LHO <message>"
  695. XSends a message to the person who will play or bid immediately
  696. Xafter you.  Same as the /RHB command.
  697. X
  698. X.IP "/LOG [\fIfilename\fP]"
  699. XTyping /LOG \fIfilename\fP causes this hand and subsequent hands
  700. Xto be written to the file with name \fIfilename\fP.  Omitting
  701. X\fIfilename\fP causes the current log file to be closed.
  702. XAdding a plus sign '+' to the beginning of \fIfilename\fP causes
  703. Xthe playing record to be appended to the end of the file.
  704. X
  705. X.IP "/NAME <new-name>"
  706. XChanges your name to <new-name>.
  707. X
  708. X.IP "/OPP <message>"
  709. XSends a message which will be seen only by the opponents.
  710. X
  711. X.IP "/PAUSE"
  712. XDuring bidding or play, this restores the entire screen to a talk
  713. Xdisplay.  This is useful for seeing messages which have scrolled out
  714. Xof the small conversation area which appears during bidding and play.
  715. X
  716. X.IP "/PING"
  717. XSends an invisible message to each of the other players, which is
  718. Xautomatically echoed.  Reports the round-trip communication time.
  719. X
  720. X.IP "/PRACTICE [ON|OFF]"
  721. XTurns on or off the \fIPractice\fP mode of play.  This mode allows
  722. Xa partnership to practice bidding and the planning of play.  See the
  723. Xdescription of \fIPractice\fP mode below.
  724. X
  725. X.IP "/PROMPT [ON|OFF]"
  726. XBy default, the dummy is asked to press RETURN after the end
  727. Xof each trick.  This allows the dummy to see each trick as
  728. Xit is played.  This prompting can be disabled by typing
  729. X/PROMPT OFF.  The prompt mode can be toggled with ^P.
  730. X
  731. X.IP "/QUIT"
  732. XTerminates the program.
  733. X
  734. X.IP "/REVEAL [<player-name> | NORTH | EAST | SOUTH | WEST"
  735. X| NE | NS | NW | SE | SW | EW]
  736. X.IP
  737. XThis command can only be used by an observer or the dummy.  In this
  738. Xcase, the player enters \fIspectator\fP mode and the named hands are
  739. Xrevealed.  In spectator mode, the observer can have complete
  740. Xinformation about the game.  Spectators may talk to each other, but
  741. Xthey may not talk to the players or to other observers who are not
  742. Xspectators.  Spectator mode is not available in formal play.  If the
  743. Xname of the player is omitted, then all hands are revealed.  (This
  744. Xcommand is actually the same as the /SPEC command.)
  745. X
  746. X.IP "/REVIEW"
  747. XDisplays the bidding for review.  This is intended to be used
  748. Xduring the playing mode.  This command can be abbreviated with ^B.
  749. X
  750. X.IP "/RHB <message>"
  751. XSends a message to the person who appears to the right of you in
  752. Xthe bidding display.  Same as the /LHO command.
  753. X
  754. X.IP "/RHO <message>"
  755. XSends a message to the person who bids or plays immediately before
  756. Xyou.  Same as the /LHB command.
  757. X
  758. X.IP "/SEAT NORTH|EAST|SOUTH|WEST|OBS"
  759. X.IP "/EAST, /NORTH, /OBS, /OBSERVER, /SOUTH, /WEST"
  760. X.IP
  761. XSelects a seat.  Can only be used before the first hand or between
  762. Xhands.  Only one person may sit in the seats north, east, south, west,
  763. Xbut there may be many observers.
  764. X
  765. X.IP "/SETCC [<your-convention-card>]"
  766. XEnters one line of text as your convention card.  This card will
  767. Xthen be announced to your partner and the opponents as the convention
  768. Xcard for your team.  Omitting convention card from this command will
  769. Xcause your current convention card to be announced to your partner
  770. Xand opponents.  If the convention card is just a single word, then
  771. Xthe list of convention cards specified in the .okbridgerc file with
  772. Xthe CCDEF command is searched for a matching entry.  If a matching
  773. Xentry is found, then the corresponding convention card is used.
  774. X
  775. X.IP "/SPEC [<player-name> | NORTH | EAST | SOUTH | WEST"
  776. X| NE | NS | NW | SE | SW | EW]
  777. X.IP
  778. XThis command can only be used by an observer or the dummy.  In this
  779. Xcase, the player enters \fIspectator\fP mode and the named hands are
  780. Xrevealed.  In spectator mode, the observer can have complete
  781. Xinformation about the game.  Spectators may talk to each other, but
  782. Xthey may not talk to the players or to other observers who are not
  783. Xspectators.  Spectator mode is not available in formal play.  If the
  784. Xname of the player is omitted, then all hands are revealed.  (This
  785. Xcommand is actually the same as the /REVEAL command.)
  786. X
  787. X.IP "/WAKEUP [<player-name> | ALL]"
  788. XSends a wakeup signal to the named player, or to all players if
  789. XALL is specified.  The wakeup signal rings the terminal bell and
  790. Xprints the words "WAKE UP" in the conversation area.  If the name of the
  791. Xplayer is omitted, then the signal is sent to your partner.
  792. XPressing ^W is the same as typing /WAKEUP.
  793. X
  794. X.IP "/WHO"
  795. XGives a short list of the other players and their respective seats.
  796. X
  797. X.IP "/WHOIS [<player-name>]"
  798. XInquires about a specific player.  If the player has listed his/her
  799. Xfull name and email address in the .okbridgerc file, then this
  800. Xinformation is given.  If <player-name> is omitted, then inquires
  801. Xabout both of the opponents.
  802. X
  803. X.IP "/ZLOG [filename]"
  804. XThis command is similar to the /LOG command in that it also opens
  805. Xa log file, but the format of the log file is more compact.
  806. X
  807. X
  808. X.PP
  809. X.SH Server Commands
  810. X
  811. XIn addition, there are a number of commands which can be used only
  812. Xby the server.  
  813. X
  814. X.IP "/ASSIGN <player-name> NORTH|EAST|SOUTH|WEST|OBS"
  815. XAssigns a player to a given seat.  Can only be used before the
  816. Xfirst hand has been dealt or between hands.
  817. X
  818. X.IP "/DISCONNECT <player-name>"
  819. XCloses the connection to the named player.  
  820. X<player-name> can either be the name of a player (e.g., Worf)
  821. Xor the name of a position (e.g., SOUTH).
  822. X
  823. X.IP "/FORMAL [OFF|ON]"
  824. XSpecifies whether formal playing rules will be used or queries which
  825. Xplaying rules are currently use.  In formal play, talk messages
  826. Xare displayed only to the opponents, alerts are not displayed to the
  827. Xpartner of the alerter, and the dummy is not revealed to anyone
  828. Xuntil the opening lead has been made.
  829. X
  830. X.IP "/RESET"
  831. XResets the program to its initial state. 
  832. X
  833. X.IP "/SCORE RUBBER|DUPLICATE|MP|IMP|CLEAR"
  834. XSelects a scoring mode.  If the selected scoring mode is different from
  835. Xthe current scoring mode, then skips the current hand.  Using '/SCORE CLEAR'
  836. Xwill clear the scoreboard.
  837. X
  838. X.IP "/SKIP [\fIn\fP]"
  839. XEnds the current hand immediately, without recording a score for it.
  840. XIf we are the server, then the parameter \fIn\fP specifies the number 
  841. Xof hands to skip (including the current one).
  842. XThis command is useful in case the connection to one of the players is lost.
  843. X
  844. X
  845. X.PP
  846. X.SH The Global Player Service
  847. X
  848. XThe Global Player Service is a worldwide database of currently playing
  849. Xbridge tables.  Using the GPS, it is possible to quickly locate other
  850. Xpeople wishing to play bridge.  The following commands are for
  851. Xaccessing the GPS:
  852. X
  853. X.IP "/TABLES"
  854. XLists the currently playing tables.
  855. X
  856. X.IP "/JOIN [<name>]"
  857. XJoins the table being served by <name>.  If <name> is omitted,
  858. Xthen the first table in the list provided by the /TABLES command
  859. Xis joined.
  860. X
  861. X.IP "/SERVE [<port-number>]"
  862. XBegins serving a table.  The table will be advertised to the GPS
  863. Xautomatically, so that other players may join.  If <port-number>
  864. Xis omitted, then 1729 will be chosen by default.
  865. X
  866. X.PP
  867. XThe Global Player Service also supports a form of duplicate play.
  868. XIt maintains a database of boards which have been played by other
  869. Xfoursomes.  These boards can be downloaded and played again, 
  870. Xand match point scores will then be computed.  The following commands
  871. Xare relevant to GPS duplicate:
  872. X
  873. X.IP "/DUP [MP|IMP|END]"
  874. XUsed by the server to initiate (or end) GPS duplicate play.  The MP
  875. Xparameter is specified to play match point boards, while the IMP parameter
  876. Xis given to play IMP boards.  The default is IMP play.  After each
  877. Xboard is downloaded and played, you will be able to see the results
  878. Xof play by other foursomes.
  879. X
  880. X.IP "/RESULTS [<results-file>]"
  881. XDownloads all of the GPS duplicate boards which have been played by
  882. Xthe local player.  The results of play for each board are then displayed.
  883. XIf <results-file> is specified, then the results are saved to the given
  884. Xfile in email duplicate format.  A more verbose record of the play can
  885. Xthen be produced with the oktally command.  WARNING:  If you play often,
  886. Xthen you should specify the <results-file> and examine it using oktally.
  887. X
  888. X.IP "/SCOREBOARD"
  889. XDisplays the GPS duplicate scoreboard.  The top ten players in match point
  890. Xplay and in IMP play are listed.
  891. X
  892. X.PP
  893. XIn addition, there are the following GPS-related commands:
  894. X
  895. X.IP "/PLAYERS [<name>]"
  896. XLists the names of all of the players currently at the table
  897. Xserved by <name>.  If <name> is omitted, then lists all of the
  898. Xplayers at all tables.
  899. X
  900. X.IP "/CONNECT <host_name> [<port_number>]"
  901. XConnects to the table being served at <host_name> with port <port_number>.
  902. XIf <port_number> is omitted, then 1729 is assumed.
  903. X
  904. X.IP "/PERISH"
  905. XDisconnects from the GPS.  If we are serving a table, this table
  906. Xis deleted from the GPS database.
  907. X
  908. X.IP "/PUBLISH"
  909. XReconnects to the GPS.  If we are serving a table, this table is
  910. Xre-advertised to the GPS.
  911. X
  912. X.SH Partnership Practice Mode
  913. X
  914. XThe \fIPractice\fP mode is based on a suggestion of Alan Truscott.  In
  915. Xthis mode, two (or more) players may practice their bidding.  The
  916. Xmoderator (OKbridge) supplies PASS bids for players which are absent.
  917. XAfter the hand has been bid, it is revealed to all of the players.
  918. XThe players may then discuss and play it.
  919. X
  920. XTo enter \fIPractice\fP mode, the server uses the command '/PRACTICE ON'.
  921. XThis will deal a new hand and allow the players to bid it.  During the
  922. Xbidding, OKbridge will supply "PASS" bids for absent players.  Thus, if
  923. XNorth-South is practicing and East-West are absent, then a "PASS" will
  924. Xbe supplied by OKbridge automatically each time it is East or West's turn
  925. Xto bid.
  926. X
  927. XThis is usually the preferred behavior.  However, for three-player practice,
  928. Xit may be preferable to allow the third player to bid both hands for one side, 
  929. Xsay East-West.  In this case, the server should use the '/AUTOPASS OFF'
  930. Xcommand.  This command will disable PASS bids from being supplied by
  931. Xthe moderator.  The third player can then bid for both East and West by
  932. Xswitching seats with the /EAST and /WEST commands.
  933. X
  934. XAfter a contract has been reached, all four hands will be revealed to
  935. Xeach of the players.  The players will be able to discuss the bidding
  936. Xtogether.  They can also play out the hand.  Each player is allowed to
  937. Xplay from anyone's hand.  That is to say, if it is West's turn to
  938. Xplay, anyone may select which one of West's cards to play.
  939. X
  940. XThe /CLAIM (or /SKIP) command can be used to end the hand early.
  941. XDuring \fIPractice\fP mode, any player may use the /CLAIM command to
  942. Xspecify the number of tricks to be claimed \fIfor the declarer.\fP
  943. XNo confirmation is requested for claims made during \fIPractice\fP mode.
  944. XAfter the hand ends, the score is computed and displayed.
  945. X
  946. X
  947. X.SH Scoring
  948. X.PP
  949. XThe following tables give a basic outline of how okbridge computes
  950. Xthe scores.  It is partially derived from the documentation supplied with
  951. Xthe bridge program written by Yuan and Chu.
  952. X.IP "Trick Score (below the line)"
  953. XIf the contracting team succeeds in making their contract,
  954. Xthen the base score for the hand is computed according to
  955. Xthe following chart.  
  956. X
  957. X.na
  958. X.nf
  959. X  Spades or Hearts     30 per trick | If doubled:
  960. X  Diamonds or Clubs    20 per trick |    multiply by 2
  961. X  Notrump        40 for first trick | If redoubled:
  962. X       30 for each additional trick |    multiply by 4
  963. X.fi
  964. X.ad
  965. X
  966. X.IP
  967. XFor rubber bridge, the score is computed
  968. Xaccording to the number of tricks bid.  For other scoring
  969. Xmethods, the score is computed according to how many tricks
  970. Xwere actually made.
  971. X
  972. X.IP
  973. XIn a doubled contract in rubber bridge, overtricks are
  974. Xscored at 100 points each if not vulnerable and 200 points
  975. Xeach if vulnerable.  In a redoubled contract in rubber bridge,
  976. Xovertricks are scored at 200 and 400 respectively.
  977. X
  978. X.IP
  979. XIn rubber bridge, a game is scored if 100 points or more are
  980. Xaccumulated below the line.  The scoring side then becomes
  981. Xvulnerable and wins the rubber if they win a second game.
  982. XIn other forms of bridge, the vulnerability proceeds according
  983. Xto a rotation which cycles every 16 hands.  
  984. X
  985. X.IP Bonuses
  986. XFor rubber bridge, there is a bonus for winning the rubber,
  987. Xwhich is scored as follows: 
  988. X
  989. X.nf
  990. X.na
  991. X  Rubber bonus:   500 if you win two games out of three
  992. X                  700 if you win the only two games
  993. X.ad
  994. X.fi
  995. X.IP
  996. XFor all forms of bridge, there is a bonus for making a slam:
  997. X
  998. X.nf
  999. X.na
  1000. X                        Not Vulnerable   Vulnerable
  1001. X  Slam Bonus:  Small Slam      500           750
  1002. X               Grand Slam     1000          1500
  1003. X.ad
  1004. X.fi
  1005. X.IP
  1006. XIn rubber, there is a bonus if the contracting
  1007. Xside has enough honor cards in the trump suit:
  1008. X
  1009. X.nf
  1010. X.na
  1011. X  Honors:  4 trump honors in one hand          100
  1012. X           5 trump honors in one hand          150
  1013. X           4 aces in one hand at notrump       150
  1014. X.ad
  1015. X.fi
  1016. X.IP
  1017. XIn non-rubber bridge, there is a 300 point bonus for bidding
  1018. Xand making a game when not vulnerable.  The bonus is 500 points
  1019. Xif vulnerable.
  1020. X.IP
  1021. XMaking Doubled (or redoubled) Contract:     50 points
  1022. X.IP
  1023. XPenalties (above the line):
  1024. X
  1025. X.nf
  1026. X.na
  1027. X                Undoubled              Doubled
  1028. X             Not Vul.   Vul.      Not Vul.   Vul.
  1029. X  Down 1        50      100         100      200
  1030. X  Down 2       100      200         300      500
  1031. X  Down 3       150      300         500      800
  1032. X  Down 4       200      400         700     1100
  1033. X  Down 5       250      500         900     1400
  1034. X  Down 6       300      600        1100     1700
  1035. X  Down 7       350      700        1300     2100
  1036. X  Down 8       400      800        1500     2500
  1037. X   ...         ...      ...         ...      ...
  1038. X.ad
  1039. X.fi
  1040. X
  1041. XNote that for non-rubber bridge, the penalty sequence for doubled
  1042. Xnot vulnerable is 100, 300, 500, 800, 1100, etc.
  1043. XIf redoubled: multiply the doubled penalty by two.
  1044. X
  1045. X.IP "IMP scoring"
  1046. XThe IMP (International Match Point) scoring system is based on
  1047. Xcomparing the results of play for exactly two tables.  In this system,
  1048. Xthe difference between the score of your team and the other team who
  1049. Xplayed the same cards as you is computed and then converted to a
  1050. Xnumber of IMPs according to a table.
  1051. X
  1052. X.nf
  1053. X.na
  1054. X  Duplicate score  IMP pts     Duplicate score  IMP pts
  1055. X  ---------------  -------     ---------------  -------
  1056. X    <  20             0             750            12 
  1057. X       50             1             900            13
  1058. X       90             2            1100            14
  1059. X      130             3            1300            15
  1060. X      170             4            1500            16
  1061. X      220             5            1750            17
  1062. X      270             6            2000            18
  1063. X      320             7            2250            19
  1064. X      370             8            2500            20
  1065. X      430             9            3000            21
  1066. X      500             10           3500            22
  1067. X      600             11           4000            23
  1068. X                                   above           24
  1069. X.ad
  1070. X.fi
  1071. XIf more than two tables have played a board, then the IMP score
  1072. Xassigned to a team for the play of a board is the average of all of the
  1073. Xpairwise IMP scores.  If only one table has played a board, then the
  1074. XIMP score assigned for the play of the board is determined using the
  1075. XMono IMP system described by Gary Greene in the May/June 1990 issue
  1076. Xof \fIBridge Today.\fP  Greene describes the Mono IMP system as follows:
  1077. X
  1078. X"Mono-IMP scoring is based on an average expected score for each side's
  1079. Xhigh-card-point holding.  The table below shows the average score that
  1080. Xa given number of high-card points will produce in the long run.  I
  1081. Xhave compiled statistics from over 10000 hands from a lunchtime game
  1082. Xplayed over the last five years, and they indicate that these values
  1083. Xare a realistic long-term average."
  1084. X
  1085. X.nf
  1086. X.na
  1087. X     HCP   Vul   NV          HCP   Vul   NV
  1088. X     ---   ---   ---         ---   ---   ---
  1089. X     20    0     0      |    29    750   550  
  1090. X     21    50    50     |    30    800   600  
  1091. X     22    100   100    |    31    950   700  
  1092. X     23    150   150    |    32    1100  800  
  1093. X     24    300   200    |    33    1400  950  
  1094. X     25    450   300    |    34    1500  1050 
  1095. X     26    600   400    |    35    1650  1150 
  1096. X     27    650   450    |    36    1850  1300 
  1097. X     28    700   500    |    37+   2100  1500 
  1098. X.ad
  1099. X.fi
  1100. X
  1101. XThe number of Mono-IMPs awarded is determined by taking the difference between
  1102. Xthe score actually made and the predicted score as given in the above table.
  1103. XIf the difference is less than 600 (in either direction), then the number
  1104. Xof Mono-IMPs awarded is equal to the difference divided by 50 and rounded
  1105. Xto the nearest half point.  If the difference is greater than 600, then the
  1106. Xnumber of Mono_IMPs awarded is equal to 12 plus 1 point for each 100
  1107. Xbeyond 600, again rounded to the nearest half point.
  1108. X
  1109. X.IP "Match Point Scoring"
  1110. XThe Match Point scoring system compares the results of many tables of
  1111. Xplay.  A partnership receives one match point for each pair who played
  1112. Xthe same hands and did worse than them and a half point for each pair
  1113. Xwho scored exactly the same.  In OKbridge, match point scores are
  1114. Xnormalized to lie between 0 and 1.  The number of match points which a
  1115. Xteam receives is divided by the total number of match points which
  1116. Xcould have been won.  Thus, normalized match points represent a per
  1117. Xcent ranking among the other teams who played the board.  If a board
  1118. Xhas been played by only one table, then a simulated match point score
  1119. Xis assigned.  The simulated match point score is 1 if the Mono-IMP
  1120. Xscore is 1 or greater, 0 if the Mono-IMP score is -1 or less, and 0.5
  1121. Xotherwise.
  1122. X
  1123. X.SH "Playing Duplicate Bridge"
  1124. X.PP
  1125. XIn addition to the GPS duplicate mode described above, okbridge allows
  1126. Xboards to be read from and written to files.  These files can be mailed
  1127. Xto other foursomes for play, allowing for 'email duplicate' matches.
  1128. X.PP
  1129. XTo begin email duplicate play, the server at the first table uses the
  1130. X/SAVE command to save a set of boards after they have been played.
  1131. XThe /SAVE command creates a record of the boards along with a complete
  1132. Xrecord of how they were played.  This file can then be mailed to others
  1133. Xfor play.
  1134. X.PP
  1135. XTo replay a set of boards which have been saved, the server
  1136. Xuses the /LOAD command to load the boards.  This loads the boards
  1137. Xfrom the file into memory and immediately begins playing them.
  1138. XAfter the boards have been played, the server can /SAVE the boards
  1139. Xback to a file.  This will save the previous results of play along
  1140. Xwith the new results.
  1141. X.PP
  1142. XAlternatively, a sequence of boards can be replayed by using the
  1143. X/REPLAY command.  This first causes the boards to be read into the
  1144. Xprogram for play.  After they have been played, they are then
  1145. Xautomatically saved along with the results back to the file from
  1146. Xwhich they were read.
  1147. X.PP
  1148. XTo create a unplayed set of shuffled boards, use the
  1149. X.IR okshuffle (6)
  1150. Xprogram.  Also, to merge a number of boards that have already been
  1151. Xplayed, you can use the
  1152. X.IR oktally (6)
  1153. Xprogram. See their man pages for more details.
  1154. X
  1155. X.SH "The .okbridgerc initialization file"
  1156. X.PP
  1157. XIt is possible to store a number of default settings into a
  1158. Xfile which will be read at initialization.  When the
  1159. Xprogram starts, the current working directory is first searched for a
  1160. Xfile named ".okbridgerc".  If no file is found, then the home
  1161. Xdirectory is searched for the same file.  For an example of an .okbridgerc
  1162. Xfile, see the file in this distribution named
  1163. X"okbridgerc".  (Note that it is incorrectly named -- to be read by the
  1164. Xokbridge program, it should be named ".okbridgerc").
  1165. X
  1166. XAfter the ".okbridgerc" file is read, the program then searches for
  1167. Xa file named ".okdefaults".  This file is of the same format as 
  1168. Xthe ".okbridgerc", and any settings file override those found in
  1169. Xthe ".okbridgerc" file.  When okbridge terminates, it may rewrite
  1170. Xthe ".okdefaults" file, saving any settings which may have been
  1171. Xchanged during the play of the program.
  1172. X
  1173. X.PP
  1174. XEach line in the ".okbridgerc" file is either a comment line or 
  1175. Xa (field, value) pair.  Comment lines begin with the pound sign '#' character.
  1176. XField, value pairs are of the format:
  1177. X
  1178. X.nf
  1179. X.na
  1180. X          <Field-name>  <value>
  1181. X.ad
  1182. X.fi
  1183. X
  1184. XThe fields which are currently recognized are as follows:
  1185. X
  1186. X.IP AUTOSAVE
  1187. XThis field specifies that the ".okdefaults" file should be rewritten
  1188. Xwhen okbridge terminates.  If this field is not present, then 
  1189. Xthe ".okdefaults" file will not be changed.
  1190. X
  1191. X.IP "BELL ON | OFF"
  1192. XWhen requesting input (a bid or a play), the terminal's bell is rung
  1193. Xby default.  However, this can be disabled by specifying 'BELL OFF'.
  1194. XThis has the same effect as the '/BELL OFF' command.
  1195. X
  1196. X.IP "CC \fIconvention-card\fP"
  1197. XThis is a one line description of the conventions which you like to use. 
  1198. X
  1199. X.IP  "CCDEF \fIConvention-Card-Name\fP \fIConvention-Card\fP"
  1200. XStores a named convention card in the internal database.
  1201. XThis convention card can then be called up during the play of the
  1202. Xprogram with the command '/CC <card-name>'.
  1203. X
  1204. X.IP  "DEFAULT ON | OFF"
  1205. XThis controls whether or not default inputs will be provided
  1206. Xfor bids, plays and questions.
  1207. X
  1208. X.IP  "EMAIL \fIemail-address\fP"
  1209. XThis should be your email address.  It is currently used only for
  1210. Xidentification purposes.
  1211. X
  1212. X.IP  "FULLNAME \fIyour-full-name\fP"
  1213. XThis field is used only for identification purposes, and should
  1214. Xcontain your full name as you would wish it to be displayed to others.
  1215. X
  1216. X.IP "GPS  ON | OFF"
  1217. XControls whether or not we will contact the Global Player Service
  1218. Xautomatically when the program starts up.
  1219. X
  1220. X.IP "GPS_IP \fIip-name-or-number-of-GPS\fP [\fIGPS-port\fP]"
  1221. XSpecifies the Internet number and port of the GPS.
  1222. X
  1223. X.IP "HELPFILE \fIdirectory-name\fP"
  1224. XThis field specifies the location of the okbridge help file.
  1225. X
  1226. X.IP "LOAD \fIemail-duplicate-filename\fP"
  1227. XThis field is only valid if the position is north and the scoring mode
  1228. Xis email duplicate.  In this case, okbridge will automatically read a
  1229. Xset of email duplicate boards from the named file.
  1230. X
  1231. X.IP "LOG \fIfilename\fP"
  1232. XIf this statement is present in the startup file, then the hands will
  1233. Xautomatically be logged to the given filename.  If the first character
  1234. Xof \fIfilename\fP is a plus sign '+', then the log is appended to
  1235. X\fIfilename\fP.  Otherwise, \fIfilename\fP is overwritten.
  1236. X
  1237. X.IP "MY_IP  \fIlocal-IP-number\fP"
  1238. XThis field specifies the IP number of the local player.
  1239. XUsually, okbridge can determine the IP number correctly,
  1240. Xbut on some systems, this field must be used.
  1241. X
  1242. X.IP "NAME \fIlocal-player-name\fP"
  1243. XThis field specifies the name that will be used to identify the local
  1244. Xplayer to the other players.  If both the NAME field and the POSITION
  1245. Xfield are present in the .okbridgerc startup file, then the
  1246. Xcorresponding parameters can be omitted from the okbridge command
  1247. Xline.  In this case, the SERVER field should also be specified in 
  1248. Xthe .okbridgerc file.
  1249. X
  1250. X.IP "PORT \fIpositive-integer\fP"
  1251. XThis field specifies the internet port number that will be
  1252. Xused for communications with the server.  It is usually not
  1253. Xnecessary to specify a port number.
  1254. X
  1255. X.IP "PROMPT NO | YES"
  1256. XThe value of this field is only relevant in hands where the local
  1257. Xplayer is the dummy.  In this case, the dummy is ordinarily prompted
  1258. Xto press RETURN at the end of each trick.  This allows the dummy to
  1259. Xsee the cards that are played as they are played.  However, if 'PROMPT
  1260. XNO' is specified, then the dummy will not be prompted.
  1261. X
  1262. X.IP "SCORING RUBBER | CHICAGO | DUPLICATE | EMAIL | IMP"
  1263. XThis field is only relevant if the local player is north.  In this
  1264. Xcase, the SCORING field determines the type of scoring that will be
  1265. Xused by default in the game.
  1266. X
  1267. X.IP "SEAT NORTH | EAST | SOUTH | WEST"
  1268. XThis field specifies the local player's position.  If both the NAME
  1269. Xfield and the POSITION field are present in the .okbridgerc startup
  1270. Xfile, then the corresponding parameters can be omitted from the
  1271. Xokbridge command line.  In this case, the SERVER field should also be
  1272. Xspecified in the .okbridgerc file.
  1273. X
  1274. X.IP "SERVER ME | \fIinternet-name-or-number\fP"
  1275. XIf the value of this field is 'ME', then the local player will assume
  1276. Xthe role of server.  If the value of this field is anything else, then
  1277. Xit is interpreted as an internet name or number of the machine where
  1278. Xthe server is running.
  1279. X
  1280. X.IP  "ZLOG \fIfilename\fP"
  1281. XThis command is similar to the LOG command, in that it opens
  1282. Xa file for recording play, but the format of the file is more concise.
  1283. X
  1284. X.SH "FILES"
  1285. X".okbridgerc"    - user defaults file
  1286. X.SH "SEE ALSO"
  1287. Xokshuffle(6),
  1288. Xoktally(6)
  1289. X.SH AUTHOR
  1290. X.PP
  1291. XMatthew Clegg, mclegg@cs.ucsd.edu.
  1292. X.PP
  1293. XMan pages adapted by George Ferguson,
  1294. X.br
  1295. Xferguson@cs.rochester.edu.
  1296. END_OF_FILE
  1297. if test 42256 -ne `wc -c <'okbridge.man'`; then
  1298.     echo shar: \"'okbridge.man'\" unpacked with wrong size!
  1299. fi
  1300. # end of 'okbridge.man'
  1301. fi
  1302. echo shar: End of archive 2 \(of 14\).
  1303. cp /dev/null ark2isdone
  1304. MISSING=""
  1305. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  1306.     if test ! -f ark${I}isdone ; then
  1307.     MISSING="${MISSING} ${I}"
  1308.     fi
  1309. done
  1310. if test "${MISSING}" = "" ; then
  1311.     echo You have unpacked all 14 archives.
  1312.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1313. else
  1314.     echo You still need to unpack the following archives:
  1315.     echo "        " ${MISSING}
  1316. fi
  1317. ##  End of shell archive.
  1318. exit 0
  1319.