Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!uunet!zephyr.ens.tek.com!tekred!saab!billr From: billr@saab.CNA.TEK.COM (Bill Randle) Newsgroups: comp.sources.games Subject: v11i038: vcraps - display-oriented craps game, Patch3 Message-ID: <6216@tekred.CNA.TEK.COM> Date: 27 Aug 90 17:03:37 GMT Sender: news@tekred.CNA.TEK.COM Lines: 92 Approved: billr@saab.CNA.TEK.COM Submitted-by: Robert Steven Glickstein Posting-number: Volume 11, Issue 38 Archive-name: vcraps/Patch3 Patch-To: vcraps: Volume 11, Issue 34-35 [[This patch allows the '$' command to report how much of your money on the table is in returnable bets (i.e., bets that can be taken down). The '$' command also retains the old behavior of reporting the total amount of your current wagers.]] #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'patches03' <<'END_OF_FILE' X*** patchlevel.h.orig Fri Aug 24 12:09:14 1990 X--- patchlevel.h Mon Aug 27 08:35:55 1990 X*************** X*** 1 **** X! #define PATCHLEVEL 2 X--- 1 ---- X! #define PATCHLEVEL 3 X*** vcraps.c.orig Fri Aug 24 12:08:43 1990 X--- vcraps.c Mon Aug 27 08:35:27 1990 X*************** X*** 1755,1765 **** X X ShowTotal() X { X! int i, total = 0; X char buf[80]; X X! for (i = craps_PassLine; i < craps_Bets; ++i) X total += Craps_GetBet(&Table, i); X! sprintf(buf, "Wagers on table total $%d", total); X Message(buf); X } X--- 1755,1790 ---- X X ShowTotal() X { X! int i, total = 0, returnable = 0; X char buf[80]; X X! for (i = craps_PassLine; i < craps_Bets; ++i) { X total += Craps_GetBet(&Table, i); X! switch (i) { X! case craps_PassLine: X! case craps_DontPass: X! if (Craps_Point(&Table) == 0) X! returnable += Craps_GetBet(&Table, i); X! break; X! case craps_Come4: X! case craps_Come5: X! case craps_Come6: X! case craps_Come8: X! case craps_Come9: X! case craps_Come10: X! case craps_DontCome4: X! case craps_DontCome5: X! case craps_DontCome6: X! case craps_DontCome8: X! case craps_DontCome9: X! case craps_DontCome10: X! break; X! default: X! returnable += Craps_GetBet(&Table, i); X! break; X! } X! } X! sprintf(buf, "Wagers on table total $%d ($%d returnable)", X! total, returnable); X Message(buf); X } END_OF_FILE if test 1452 -ne `wc -c <'patches03'`; then echo shar: \"'patches03'\" unpacked with wrong size! fi # end of 'patches03' fi echo shar: End of shell archive. exit 0