CONEYGAMESh DSK (
*README UP31/CARDS 9"031/DICE K631/STICKS P031/WIN PdGALE/GAME GALE/WIN P`LOAD NIMROW NIMROW/WINXP@PENNEY/WIN P PENNEYTOSS pSHUTOUT ' aSHUTOUTWIN^P0TICTAC/PHI "BTICTAC/WINPd1CONEY GAMES (C) COPYRIGHT 1990 BY BARRY A. TRAVER M CONEY GAMES is a collection of eight games taken from Volumes 1 and 2 ofKthe Genial TRAVelER. With the exception of TICTAC/PHI (which was releasedJinto the public domain), all of the programs are copyrighted and not to bedistributed without permission. K The name "CONEY GAMES" actually has two references: (1) it alludes toPHI (which was releasedOConey Island, a famed amusement park located in New York City, and (2) it makesJreference to an older meaning of the word "coney," which meant "sucker" orO"dupe," since all of the games have secrets which give the knowledgeable playerOa definite advantage over the person who does not possess such knowledge. SomeJof the "CONEY GAMES" have, in fact, occasionally been used as "CON GAMES,"Lsince confidence tricksters at times have used them for their own purposes. L The purpose here, of course, is instruction and amusement. It's fun toJplay the games without knowing the tricks, and a challenge to discover theOtricks on your own. (If you need help, you can consult the various "WIN" files Kon the disk.) Needless to say, the games can be a good source of amusementJwhen you know the tricks and your friends do not (although they may not beequally amused!). O The Genial TRAVelER is not all "fun and games," of course. In it, you canNfind many types of articles and programs. If you would like to order GT, justMindicate what volume(s) you want, and send a check for the appropriate amountOto Barry Traver, Editor, Genial TRAVelER, 835 Green Valley Drive, Philadelphia,In it, you canNPA 19128 (phone: 215/4831379). If you have a printer, you can print out anduse the order form below: P . Please send me the following (check one): , you canO___ Volume 1 @ $36 ___ Volumes 1 and 2 @$65 ___ Volumes 1, 2, and 3 @ $90 .___ Volume 2 @ $36 ___ Volumes 2 and 3 @$65 .___ Volume 3 @ $36 ___ Volumes 1 and 3 @$65  . Please send me the following (check one): , you canPName: __________________________________________________________________________ PAddress: _______________________________________________________________________ PCity: _______________________________ State or Province: ____________________ PCountry: ____________________________ ZIP or Postal Code: ___________________ Address: _______________________________________________________________________ PCity: _______________________________ State or Province: ____________________ $`&8 @xDD88&0 $`&L `&d88@&\ $`&l8H&x $`&8DDDDDP& $`&8D X& $`&8DD8`& $`&(Hh& $`'@xD8p' $`'( @xDD8x' $`)~߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀߀$'< $ B`)~bbbbbbbbbbbb$ J J :F ) $ B`)~`jSAVE 2REMOVE)$CARDS (SETUP %0 ` $x 0[p[ Z)?UI~DTOTALMOD9TOTAL!7\&7R&:H&>>&H4&U*&X &^&&&&'S'{''(9(?(()1)l##v$2l$pb#}X)N)D):*"0*W&*`*s**++<+m+++++,,,4,R,Z,ur,h,^!T,J&@,6,".%.?.T!!""#S")"#a"Z#"#o../s/0,0H01!x1zn$d1F%`<%f2$(%2%%Z
1%xSCREEN121131/CARDS COPYRIGHT (C) 1989, 1990 by Barry A. Traver ALL RIGHTS RESERVED!?RS$Y144THANK YOU FOR PLAYING! DSK1.LOAD&P$1PLAYER 1P$2PLAYER 2013198P$2P$2012138P$2P$2012138P$1P$1,11198P$1P$18111NAME OF PLAYER 1?NAME OF PLAYER 2?0P$1COMPUTER121YOUR NAME? 0P$2COMPUTER121YOUR NAME?
YC3
YC2
YC1:ٷM$ACE10ٷM$110C3V1<ٷM$FIVE10ٷM$510C19V5<ٷM$FOUR10ٷM$410C15V4=ٷM$THREE10ٷM$310C11V3:ٷM$TWO10ٷM$210C7V2=YC1xI14SUIT$III16VALUE$IIHCCOLEFLAGHIINCJKM$NP$PL$PS$RROWRS$ST$TOTALVYCYC$'CARDS46SUIT$4VALUE$6F@P>ACCKEYCLEARCOLORKEYLINKPAUSESCREEN
DUMMYDATA COPYRIGHT (C) 1989 by Barry Traver, 835 Green Valley Drive, Philadelphia, PA 19128 (phone: 215/4831379)  ALL RIGHTS RESERVED!I I1NPAUSEN@P+HCHARRC2KCH$ַKַKطFL$11ַKطFL$21BFL$YNַKYַKN䁝HCHARRC2KCH$ַKK96KK32SS1䁄K13KDFFL$19QK81K13HCHARRC281CH$Q'CTR10HCHARRC2DFCTR0=KEY0KSCTRCTR1CTR5HCHARRC230GCHARRC2DFRCַDFCTR0QACCKEYRCFL$CH$ڂCCTRDFKRSCH$FL$GCHARHCHARKEY@P@P+NTOTALTOTALVT$۷TOTALROWCOL2շT$+۷V=T$ROWROW1[CARDSSV1LINKREMOVERCTOTAL0ROWCOL4۷VTOTALVROWROW1FCARDSSV1241ALREADY TAKEN! TRY AGAIN.EFLAG1:S7V7241HUH?? TRY AGAIN!EFLAG16ٷM$SIX10ٷM$610C23V6(ٷM$DIAMONDS10R16S4*ٷM$CLUBS10R11S3b*ٷM$HEARTS10R6S2b4EFLAG0ٷM$SPADES10R1S1bSV7PAUSE100=21INC1220M$0EFLAG24121INC1PL$:QM$VALUE$VSUIT$SPAUSE30021INC1PL$:12M$:VV1V0V6ց0PS$طPS$1H1طPS$H1շPS$H@HϷշPS$11SڷطPS$H1CARDSSV0PS$PS$1234$Vڷط۷VϷշ۷V11
NN7TOTALNV123456TOTALNVNTOTALN3 GET RESPONSE FROM COMPUTER GET RESPONSE FROM HUMANTOTAL0R3 SET UP NEW ROUNDK241SAME KIND? YACCKEY2412YNRS$RS$Y=231ANOTHER GAME? YACCKEY2315YNRS$dTOTAL31211P$2 WINS!TTOTAL31211P$1 WINS!TYC2YC3PL$P$2INC1dTOTAL31211P$1 WINS!TTOTAL31211P$2 WINS!TYC1YC3PL$P$1INC0vROW3COL24I14J16CARDSIJ0JILINKSETUPLINKCARDS126SUMr(ACCKEY222314YC$YCڷYC$~131 (Computer plays first) 3. Human vs. Human 4. Computer vs. ComputerWhat is your choice? YC{31What is your preference? 1. Human vs. Computer (Human plays first) 2. Computer vs. Human<CLEARI012COLORI161ISCREEN5KEY0KSS0f191first player to make thetotal go over 31 _loses_.(Press any key to continue.)g131removing cards. A runningtotal is kept of the valuesof the cards removed. Theb75This version of "31" isplayed with playing cards. Two players take turns^
OF SPADES
OF HEARTS OF CLUBS OF DIAMONDSACETWOTHREEFOURFIVESIX 31/CARDS by Barry TraverjINITLOAD819663248LOAD1637665323232323225548LINKAY144.)$:%`% `%0 `%H%@ $`%\ `%t88%l $`%8TT8% $`%8DDDDD% $`%8D % $`%8DD8 % $`&(H(% $`&@xD80&> 7""""x"n"d"Z"P"F"<"2"(#!#d#v
##$0$^$$$$$%%j%&`%tL%.% %&&<&h&p&f'\''R'=H'a>'~4'*' ''((>(Z(v(((!v)
l)?b)X)N!
D*O*j*+#+M+` !O++,",Mr,Zh,^,J,@6M,".'../9//00W01]1 2Y2t2zx2n2d3E
3K"*wSCREEN121131/DICE COPYRIGHT (C) 1989, 1990 by Barry A. Traver ALL RIGHTS RESERVED!:TOPRSR1PL$TOTALTOTALTOP.RR1`?RS$Y144THANK YOU FOR PLAYING! DSK1.LOADA241 RESPONSE?ACCKEY241216RS$RSڷRS$^2411920ANOTHER2020GAME? YACCKEY2026YNRS$QSCREEN13CBRTOPRSR1PL$TOTALTOTALTOP.RR1`I1923I19ICBR COPYRIGHT (C) 1989 by Barry Traver, 835 Green Valley Drive, Philadelphia, PA 19128 (phone: 215/4831379)  ALL RIGHTS RESERVED!I I1NPAUSEN@P+HCHARRC2KCH$ַKַKطFL$11ַKطFL$21BFL$YNַKYַKNHCHARRC2KCH$ַKK96KK32SS1K13KDFFL$19QK81K13HCHARRC281CH$Q'CTR10HCHARRC2DFCTR0=KEY0KSCTRCTR1CTR5HCHARRC230GCHARRC2DFRCַDFCTR0QACCKEYRCFL$CH$CCTRDFKRSCH$FL$GCHARHCHARKEY@P@P+LINKSIXLINKFIVELINKFOURLINKTHREELINKTWOLINKONEMDTOPLINKCLEAR819 TOP VIEW:Dĳγ DISPLAY DICE*R1PL$11TP$15TTL$4TP$۷TOPTTL$۷TOTALշTTL$1TTL$ TTL$+TOTAL30TOP2TOP3RS1RS2+TOTAL29TOP1TOP3RS2RS1+TOTAL28TOP1TOP2RS3RS1%PAUSE300TOP3TOP7TOP, GET RESPONSE FROM COMPUTER IF TOTAL >= 28YTOPڷط۷RSϷշ۷RS11R1PL$TOTALTOTALTOP.RR1`P16RS234P27RS36p#P11P21P26RS34pP12P14RS23pP33RS15pP24P28RS13p*P31P34P35P39RS12pP37RS6p"P13P18P38RS5p)P15P19P25P29RS4pP17P22RS3pP32P36RS2pP23RS1pMODTOTALMOD9TOTALPڷ۷TOP۷MODTOTAL%PAUSE300TOP3TOP7TOP* GET RESPONSE FROM COMPUTER IF TOTAL <2842220ON THE2320BOTTOM!NnRS7TOPSCREEN71919 YOU CAN'T2019 DO THAT 2121۷RS IS52220ALREADY2320ON TOP!NjRSTOPlSCREEN71919 YOU CAN'T2019 DO THAT 2121۷RS IS GET RESPONSE FROM HUMAN5PL$P$1R221PL$.R3`110TOP14TOTAL219
(REMEMBER:20OPPOSITE22SIDES22TOTAL21SEVEN!))STARTϷ61TOPSTARTTOTALSTART CALCULATE START`2220THE SAME2320KIND? YACCKEY2326YNRS$RS$YJ^ZTOTAL31R1P$1 WINS!TOTAL31R1P$2 WINS!*YC1YC3DTOTAL28PL$P$1ZTOTAL31R1P$2 WINS!TOTAL31R1P$1 WINS!*YC2YC3DTOTAL28PL$P$20CLEARSCREEN13 CALCULATE START.YC4P$1PLAYER 1P$2PLAYER 2YC3111INITIALS OF PLAYER 1?INITIALS OF PLAYER 2?11236P$113236P$2XYC2P$1COMPUTER121YOUR INITIALS? 12178P$2XYC1P$2COMPUTER121YOUR INITIALS? 12178P$19ACCKEY222314YC$YCڷYC$LINKSETUP~131 (Computer rolls first) 3. Human vs. Human 4. Computer vs. ComputerWhat is your choice? YC{31What is your preference? 1. Human vs. Computer (Human rolls first) 2. Computer vs. Human:I012COLORI161ISCREEN5YC1$KEY0KSS0恝CLEARA221wins, of course).(Press any key to continue.)181number on top is added tothe previous total. Again,the first player to go over31 _loses_ (and his opponent141starting number for thatround. After that, playerstake turns giving the die aquarter turn, and the new101the first player to go over31 _loses_. The beginningplayer throws the die, andthe number on top is thez65This version of "31" isplayed with a die (that is,half a pair of dice). As in other variations, 31/DICE by Barry Traver@PFIVE &FOUR &`THREE &TWO %ONE %CLEAR %SETUP %0 ` $x 0[p[ Z(?U$DTOTALMOD9TOTALFIVE &FOUR &`THREE &TWO %ONE %CLEAR %SETUP %0 ` $x 0[p[ Z(?U$DTOTALMOD9TOTAL &s`` l& && PD``l'='<& >mV# & &S SC# $`'$J &J'^ $`&((((((((8T0T8`d0dL PP TH4 D((D0 00 @8DLTdD8088DD 8DDD8(Hx@@xD88@@xDD8 8DD8DD88DD<x0000000 @ 8DD8DTX@<(DDDDxDDxDDx8D@@@D8xDDDDDx@@x@@@@x@@@8D@\DD8DDDDDD88D8DHP`PHD@@@@@@DlTDDDDDddTLLDDDDDDxDDDx@@8DDDTL<xDDDxHD8D D8DDDDDD8DDDDD(DDTTTT(DD((DDDD( @8 8@ 88(D 8HHH< 8$$$8 $$$$< 8$$8 8$$$$08H0 $(0($08xTTTT8$$$$$$$8$$8 $$(4 8<$$$$DD((DTTT($$$$$$8<< ``$' $`&$J &`&$J &`&SAVE 2SMCAPS*LGCAPS*NEWSET*CHRSET'nBL1314'f0 ` $x 0[p[ Z*?ЪU$SELINKSMCAPS PAUSELINKNEWSET PAUSELINKLGCAPS? OAD &%[7)))*(U*:(*Hz'p*pf+\2R2H,>,4*3# 22,}2./._566).6/v3l3b/'X3N4$D/R:/j04R&4n4/444445//'
((05&5;0ar)^h0^3eT3uJ0@3'65,5b"+201:(/1d+H6&77Q711)'j,tx,zn+d+8*I12 NIMROW: A GAME OF SKILL(C) 1988,1990 BY B.A. TRAVER_ DELSPRITE춂134THANK YOU FOR PLAYING. HAVE A GOOD DAY! DSK1.LOAD Version 1.04 of NIMROW COPYRIGHT (C) 1989 by Barry A. Traver, 835 Green Valley Drive, Philadelphia, PA 19128 (phone: 215/4831379).<KEY0KSCTRCTR1CTR5HCHARRC230%CH2Ϸ81˷CH1CH22WFL$YNַKYַKNzHCHARRC2KCHKCH89CH1CH0S1zK96KK322RS DELSPRITE춂211`224FF$ SIDE HAS LOST!4ANOTHER GAME (Y/N)? YACCKEY2424YNRS\241PLAY TO BITTER END (Y/N)? NACCKEY2427YNRSRSBE1삕TYPE$1CHKK48KK48%HCHARRC2KK64KK64ַKطFL$11ַKطFL$21z
K13KDF'CTR10HCHARRC2DFCTR0CACCKEYRCFL$CHGCHARRC2DFRCַDFCTR0 COPYRIGHT (C) 1989 by Barry Traver, 835 Green Valley Drive, Philadelphia, PA 19128 (phone: 215/4831379)  ALL RIGHTS RESERVED!LC16D481 2 3 4 5 6 7 8I182I46۷II@P+JACCKEY221714TYPETYPE$۷TYPE221SF8A2$B2$BCBECC1CFCH1CH2CTRCWDDDFFFF$FLAGIIIJJJKMRR1RSRS$RWRWTSSFSGSTT1T2T3T4TYPETYPE$XXIXJZZFZH@PNACCKEYCHARCOLOR DELSPRITEKEYLOCATEMAGNIFYSPRITE IZF7CTR0I18XI0CTRCTR1ZFZCTRIIZF0>XIXIXJXJPXIXIXJXJXI4XI5XI6XJ4XJ5XJ6XIXI4XJXJ4"JI18XI0J8*I17XI046I18XIDIIZFXZ1XZ1M=IIIJJSTLOCATER1SFRR1IILCR1SFC1,/IICLCR1SFJJCC1IIJJST4ST4K228CFRWR1RW23CFTO COL?238CFCWC1CWUACCKEY228CF18R123CFTO COL?ACCKEY238CF18C1%ڂRWZ1CWLCZ1SFMSG*ڂRWZ1CWLCZ1SFMSGCWLCRWSFMSG,RWTϷJJ1RWDDRWTMϷDRW1DRWTϷJJ1RWDDRWTM1÷Ϸ÷LCRWSFBCSG1D ZF0CTR1ֳNXl!ZF1TYPET1TYPET2AI182I42 2I424 I,241FLAG1FF߷1SFI1II1I9^/I18DILCI8LCI1IBEgI18SPRITEI140161716ICLCII8140121716ICLCI8I)LCICH1CH2LCI8߷CH1CH2I#BE0I18CH1Ϸ81bMAGNIFY3COLOR1492CHAR1360000000000000000138FFFFFFFFFFFFFFFF0I18RI16I17CI16I49Ib221 TYPE? TYPE$1YOU GO 1ST 2YOU GO 2ND3NO COMPUTER 4ALL COMPUTER@XI1XI3XI5XJ1XJ3XJ5XIXI1XJXJ1CTR0MM1M1@XI2XI3XI6XJ2XJ3XJ6XIXI2XJXJ2J=SF219
RIGHT TO MOVE219LEFT TO MOVEDI0I17XZ3XZ1ZHZ3Z3Z1Z1ZH7XZ2XZ1ZHZ2Z2Z1Z1ZH7XZ2XZ1ZHZ2Z2Z1Z1ZHRWZ1CWLCZ1SFXZ1SGII8:IIII1& DII0JJJJ1DDJJIIII1JJ0II8IIII1#LCIISFBCJJJJ1DDJJIIII1JJ0
RW9"DRW0RW9RWRW1RW1I8II1&DI0LCISFFFFLAG0TSF8SF0FF$ LEFTCFT1SGBC1T23T32T44SG1BC1@GSF8FF$ RIGHTCF18T12T23T31T44SG1BC8)TYPET3TYPET4223CFROW?qSG÷C1LCR18SF0C1LCR18SFC1LCR1SF241 ROWR1COLC1IS NOT ALLOWED!TYPET1TYPET2223CFROW?L51B2$B2$A2$A2$B2$B2$A2$A2$B2$B2$A2$A2$B2$B2$A2$A2$4B2$ ַ1382ַ136244A2$ ַ1362ַ13824RCHAR140@00030F1F3F3F7F7F7F7F3F3F1F0F030000C0F0F8FCFCFEFEFEFEFCFCF8F0C000?
IMROW WINNING NIMROW (C) COPYRIGHT 1990 BY BARRY A. TRAVER N Martin Gardner's book WHEELS, LIFE AND OTHER MATHEMATICAL AMUSEMENTS (NewLYork, 1983), describes "a pleasant countermoving game on a chessboard" (seeIpages 145146). That "game without a name" appears here in the followingformat: N One white counter and one yellow counter are placed randomly in each row,Othe only restrictions being that the white counter be to the left of the yellowLcounter and that the two counters be separated by at least one empty square.IPlayers alternate moves, a move consisting of moving one of your countersKhorizontally any number of empty squares in its row, forwards or backwards.t of the yellowLJumping your opponent is not allowed, and the last person to be able to movewins. It's that simple! L My version of the game is called NIMROW, and after the program randomlyty squares in its row, forwards or backwards.t of the yellowNsets up the pieces on the board, you are allowed your choice of four differentLoptions: (1) you can go first (against the computer), (2) you can go secondJ(against the computer), (3) you can play against a friend, and (4) you can the yellow'watch the computer play against itself. M Since you get to choose whether to go first or second _after_ the piecesMare set up, it _should_ be easy to beat the computer, but I think you'll findgainst a friend, and (4) you can the yellowIit otherwise! (I haven't had so much fun writing a game since "Giant andFDwarfs," which appeared in the April 1983 issue of 99'ER HOME COMPUTER
MAGAZINE.) M A minor variation you may want to try involves modifying line 250 in theyellow*program, which reads like this at present: < 250 CH2=INT(RND*8)+1 :: IF ABS(CH1CH2)<2 THEN 250 O The following alternative does away with the rule requiring that setup of want to try involves modifying line 250 in theyellowOthe counters involve at least one empty square between counters at the start of the game: ; 250 CH2=INT(RND*8)+1 :: IF ABS(CH1CH1)<1 THEN 250 D It's up to you to decide which particular variation you prefer. 250 in theyellowM For XB programmers, the program includes the bonus of a handy singlekeyLACCEPT AT subprogram which does away with the need of the enter key but doesLinclude many other expected features of ACCEPT AT (e.g., blinking cursor andtheyellowIability to accept screen default). You may want to include this friendlyJsubprogram in your own programming for those situations where a single key:response is desired from the user, e.g., in various menus. , blinking cursor andtheyellowO By the way, the name NIMROW gives away a secret of that game. In reality,Kit is a disguised form of the game NIM, whose analysis you can find in manyLdifferent books on mathematical recreations. The game NIM is usually playedheyellowHwith piles or groups of coins, stones, or whatever may be available. InINIMROW, each ROW corresponds to a pile or group, with the _empty_ squaresMbetween the two pieces corresponding to whatever is in the piles or groups in playedheyellowthe more usual version of NIM. L To win the ordinary game of NIM (most often played with coins placed inOthree rows, 5 in the first, 4 in the second, and 3 in the third), the secret istever is in the piles or groups in playedheyellowMto "balance" the numbers in binary notation, making sure that each "place" isset an even number of times. O It's easier to demonstrate than to explain, so let's analyze the beginningtever is in the piles or groups in playedheyellowCwinning move in a typical game of NIM, starting with this position: ' Decimal Binary' O O O O O 5 1 0 1' O O O O 4 1 0 0' O O O 3 1 1 heyellowL(You may have to do some review of binary notation to follow this!) In thisNposition, the 4's column and the 1's column are both balanced, but not the 2'sHcolumn. Thus the winning move is to take 2 counters from the third row,leaving this possition: ' Decimal Binary' O O O O O 5 1 0 1' O O O O 4 1 0 0' O 1 1 INow the columns are "balanced," with an even number of 1's in each column this possition: "(remember: 0 is an even number!). H In playing NIMROW, the computer does a similar but more complicatedManalysis. (The essential difference is that there are eight rows rather thanced," with an even number of 1's in each column this possition: Nthree rows involved, but the principle of expressing each row in binary formatNand balancing the columns is the same.) It _is_ possible to beat the computerOat NIMROW, but you do have to analyze the random position at the very beginninghis possition: Lvery carefully to determine whether it's to your advantage to start first orsecond. cing the columns is the same.) It _is_ possible to beat the computerOat NIMROW, but you do have to analyze the random position at the very beginninghis possition: WINNING PENNEYTOSS (C) COPYRIGHT 1990 BY BARRY A. TRAVER N In PENNEYTOSS, the person to go second has the advantage, because he getsKto make his choice on the basis of what the first person has chosen. SinceJthere is still an element of chance involved, the second person cannot winCevery time, but he can make it so the odds are definitely with him. M How does he decide what to guess? Simple: his first letter must be theLopposite of the middle letter of what his opponent has chosen, and his finalOtwo letters must be the same as his opponents first two letters. (The letters,*of course, stand for "Heads" and "Tails.") t letter must be theO To be specific, here are the possible choices for the first player and the%best responses for the second player: FIRST SECOND HHH THH HHT THH HTH HHT HTT HHT THH TTH THT TTH TTH HTT TTT HTT J The proper response isn't that complicated to figure out: it is just HTH HHTN(hopefully) complicated enough to keep your opponent from figuring out how youare figuring it out! K If you think about it, unless the first player wins on the first threecated to figure out: it is just HTH HHTNtosses, the odds are with the second player, since what the first player needsOas the first two parts of his winning combination are the last two parts of theMwinning combination for the second player. The second player has the edge ofbeing "one ahead," so to speak. M As long as you understand how to calculate your best guess as the secondOplayer, it doesn't matter that much perhaps whether you understand the specificd player. The second player has the edge ofNprinciples involved. In other words, as in many "Coney Games," you don't needOto understand why the winning response is a winning response: you just have to4know how to figure out what the winning response is! player has the edge of>I!745\55>5i5445b652A~1t2j2]`0V&L%B"8&.'$'['((X(():&'#))**m*+&V+^z+p,f,a\,RH]>4&s*. .V.//Y//0A$#G%2y2$7311v0l1.b77X3N7AD3:707&57D7J67P7a57#]#%{35646626r6Ch7^4T4J4F@667h,5"3K%&!!%7"""Hx"n$d0)242PRESS ANY KEY TO CONTINUEQ132BET YOU CAN'T BEAT ME IN A SET OF 10 ROUNDS!C0H0%75Philadelphia, PA 19128?55Genial Computerware 835 Green Valley DriveR11
PENNEYTOSS COPYRIGHT (C) 1985, 1990 by Barry Albert Traverk221don't know the odds!241(Press any key to conclude.)VCLEAR DSK1.LOADR$N DSK1.LOADBR$YHCHAR101632465,CLEAR DSK1.LOAD,DA24 ANOTHER (Y/N)?YN1R$I181last of remaining191pair in front) (H)HTsSCREEN3CHAR9500000000000000FF26Since you always havefirst choice and since thedSCREEN853AND THE FINAL SCORE IS: COMPUTER: C HUMAN: HCLEARSCREEN8oSCREEN1218*PENNEYTOSS*>WHICH OF THE FOLLOWING DO YOU THINK WILL TURN UP FIRST?I1250ICH10KR$YCLEARDA23 WANT EXPLANATION? (Y/N)?YN1R$CHAR95FF,241(Press any key to continue.).211Computer's choice: HHTL201needs!)L211THT).LVKEY0KSS0VO191the *SCIENTIFIC AMERICAN*.216Don't gamble when youX171also Martin Gardner's column181in the October 1974 issue ofS151Lose* (New York: Pantheon161Books, 1976, $2.95). SeeP131A SUCKER AN EVEN BREAK:141Tricks and Bets You Can'tW111mation about it can be found121in John Fisher, *NEVER GIVEP91Penney (hence the name101"PENNEYTOSS"). More inforO76This game was invented81by the mathematician Walter@41are 3 to 1 in the computer's51favor.O26Incidentally, if you31choose HHT or TTH, the oddsK151(drop last symbol) HT(H)171(put opposite ofA115Example:131Your choice: HTHT81front the _opposite_ of the91last of the remaining pair.P61drops the last symbol in71_your_ choice, and puts inP41choice? (You may already51have figured it out!) ItN26How does the computer31decide what should be itsQ181two H's you need are the191last two H's the computerW161a THH has _already_ arrived.171(Think about it: the firstX141it is not possible for a HHH151to appear in sequence beforeU121before a single T comes up,131because once a T comes up,P106The _only_ way you can111win is to have HHH come upT71you choose HHH, the computer81selects THH as its choice.O51illustrate this with the61most obvious example. IfS36That may not sound pos41sible, but it's true. Let'sT191the computer's favor (if you201choose HTH, HTT, THH, orV171choose HHH or TTT), and at181worst the odds are 2 to 1 inR151the odds are 7 to 1 in the161computer's favor (if youX131likely to come up first than141the one you choose. At bestT111is _always_ able to choose a121combination that is moreN96The computer has an101unfair advantage, because itC61to be more than fair. Well,71 IT ISN'T!T41toss of the penny is truly51random, this game would seem PENNEYTOSS by BAT (215/4831379), 85/04/25fPٷM$H$1P021ϷP271HUMAN WINS!HH1j1114___FLAG1iPٷM$C$1P021ϷP271COMPUTER WINS!CC1j1314___FLAG1!P282028___aPٷM$C$1P0211COMPUTER WINS!CC1j1314___FLAG1!P272027___P2821P___P2720P___1DA23 ANOTHER ROUND (Y/N)?YN1R$WCH153I (NEARLY) ALWAYS WIN!151YOU ARE TO BE CONGRATULATED! TEST FOR WINNER4241SCORE: COMPUTER:۷C HUMAN:۷HD715 HHH HHT HTH HTT THH THT TTH TTTiPٷM$H$1P0211HUMAN WINS!HH120P___1114___FLAG1M$M$ַN191M$/DA21WHAT IS YOUR CHOICE?121R$a141!WHO'S GOING TO TOSS THE COIN? 1. YOU (THE HUMAN) 2. ME (THE COMPUTER))141 224ڷR$hM$M$ַK191M$ST1KEY0KSTR$R$ַKROWշM$2R$շR$SIROWշM$2R$R$ַKطV$I1
I1շV$FLAG0'DA10HUMAN GUESS?HT3H$DAROWM$V$SR$FLAG0B141LET'S PLAY!!PRESS SPACE BAR FOR EACH TOSS.KEY0KSB141LET'S PLAY!!INDICATE 'H'OR 'T' FOR EACH TOSS. 121
MY CHOICE IS C$ROW1M$S1K32$S1K72÷K84XM$ HUMAN TOSSES THE COIN COMPUTER TOSSES THE COIN FLAG0X0KEY0KSM$8C$طH$12طC$21HC$TC$C$HC$RNϷN1R21N72N84 TOSS?
EE7ruF~tj!`"V"L":B"m8f.$""""##B#V D u z#p f!\#R$!H>$m4$*$ $!,$%
!%V%%v&&X&'cv:l'bX(END(:0)'&)p**}T*+a+8M!+++rNh+^wT"J,@,6,".+./9/^/00G00!9011rxn1d7F123COPYRIGHT (C) 1989, 19906BY BARRY A. TRAVER_SCREEN8144THANK YOU FOR PLAYING.7HAVE A NICE DAY! DSK1.LOADjINITLOAD819663248LOAD1637665323232323225548LINKA>KEY3KSCTRCTR1CTR5HCHAR242930"KEY3KSMAGNIFY39ַKYַKNHCHAR2429KR$ַK+CTR10HCHAR242989CTR0K13K89AKR$CTR0KR$YCLEARSCREEN8COLOR1316814128.11 S H U T O U TAKR$ COPYRIGHT (C) 1989 by Barry Traver, 835 Green Valley Drive, Philadelphia, PA 19128 (phone: 215/4831379)  ALL RIGHTS RESERVED!xCHARCLEARCOLOR DELSPRITEGCHARINITKEYLINKLOADLOCATEMAGNIFYSCREENSPRITE@P+S1+SCREEN649
S H U T O U T(K49231211d195WHAT IS YOUR CHOICE?1. YOU PLAY AGAINST A FRIEND2. YOU PLAY AGAINST COMPUTER&COLOR1316814128qM0*SCREEN6COLOR1316614126241YELLOW WINS! PLAY AGAIN? YlM0ځSCREEN6COLOR1316614126241WHITE WINS! PLAY AGAIN? Y;G$ַK2425G$FܷG$64F2ϷF24.KEY3KSS0K65K89(RRPFCCPFEFJϷ21p123849510671116121713141520182319242122p123451061171289131814151621172219242025p123849510671112131814191520161722232425p162738459101116121314151718202521222324p123845679141015111612131823192021222425p123451061178914121316211718192022232425p162349510781112141516211722182319202425p123451067891213141516171819202521222324q1238456117121015131416211718192022232425q1623495108131112141516171819202521222324q1627384910151112131416211722181920252324q1249510611712813141516211722182319202425q2738456119141015121316171823192021222425LINKCHANGE450145010÷FJRRPFCCPFDMFSR8RPM7SC8CPM9SPRITE1136HSRSC2RPM4GCHARRPM4CPM2AA32LINKSCROFFK65K89>'241 WHITE?T4pWC128*GCHARRPFCPF2ZZ136KRPFRPE˷CPFCPE4CPFCPE˷RPFRPE4.KEY0KSS0䁄K65K89243 YELLOW?p162345789101112131814191520162117222324p162738459101112131415201617181921222425p162345712891015111613141722181920252324p123451061178914121713181520162122232425p162349510781112131814151621192420252223p162345712813910111614191718202521222324p123845679141015111612171819202521222324p162738459141015121316211718192022232425q1627345108131116121714151819202521222324q1238456119141015121713181621192022232425q1234611789101213141915201617182321222425q1627458910151116121314191718202521222324q2349510678131112141516211722181920252324"I112XYPXYPYXIX&243WHITE PIECE TO REMOVE?(L1200LTK48SCREEN8.KEY0KSS0hK49K50hF$ǀĀĀĀĀĀĀʀE$ǀĀĀĀĀĀĀǀĵĶķĸĹĀĀĀĀĀĀĀD$ǀĀĀĀĀĀĀǀİıĲĳĴĀĀĀĀĀĀĀC$ǀĀĀĀĀĀĀǀīĬĭĮįĀĀĀĀĀĀĀB$ǀĀĀĀĀĀĀǀĦħĨĩĪĀĀĀĀĀĀĀA$ǀÀġĢģĤĥĀĀĀĀĀĀĀ$I125RCRPIRCPICIRCHAR136@071F3F7F7FFFFFFFFFFFFF7F7F3F1F07E0F8FCFEFEFFFFFFFFFFFFFEFEFCF8E0RCHAR128@071F3F7F7FFFFFFFFFFFFF7F7F3F1F07E0F8FCFEFEFFFFFFFFFFFFFEFEFCF8E0BCHAR10401818181F1F000000181818FFFF000000181818F8F8000000RCHAR100@18181818181818181818181F1F181818181818FFFF181818181818F8F8181818QCHAR96@0000001F1F181818000000FFFF000000000000FFFF181818000000F8F8181818@PP25RP25CP25c1671611161516191623207201120152019202347411415419423878118158198231271211121512191223x SHUTOUT COPYRIGHT (C) 1989 BY BARRY A. TRAVER, 835 GREEN VALLEY DRIVE, PHILADELPHIA, PA 19128 (PHONE: 215/4831379). Ā$ J& J% &% ,% `&$ J%% %зG $`&$ J K 0 %`&`j&&&lP> &s`` l& && PD``l'='<& >mV# & &S SC# ''^'b `J'h 0`20'c @ 4а'c2܄ܠ'g`$ @ 0`&$ @@ 0`&$ @`&$ @@`&$ J& J% &% ,% `&$ J%% %зG $`&$ J K 0 (`&SAVE 2VDPWTR(VPOKE (POKEV (VPEEK (LPEEKV (LGOSPRT(6MOVE (6STSPRT( NOMOVE( SCROFF'SCRON 'CHANGE'l0 ` $x 0[p[ Z)(?U4LINKCHANGELPNLNNEW LINE NUMBER? NLN
POSITION? PLINE? L?HUTOUT ' aWINNING SHUTOUT (C) COPYRIGHT 1990 BY BARRY A. TRAVER N SHUTOUT is a blockadestyle game but rather different from NIMROW on thisOsame disk. The strategies that are involved are not at all alike, although theMboardgames are outwardly similar in some respects. Both are fun to play, butLyou'll find it much easier to beat the computer when you are playing NIMROW. G SHUTOUT is essentially a computer version of the "delightful game"Ninvented by G.W. Lewthwaite of Scotland, as described by Martin Gardner in hisHTIME TRAVEL AND OTHER MATHEMATICAL BEWILDERMENTS (New York, 1988), pagesN154155. On a 5by5 square matrix, thirteen white counters and twelve yellowOcounters are placed in alternating checkerboard fashion (with white counters inLthe corners). To make the game more even, the first player (yellow) gets toMchoose a white counter to remove. He then moves one of his own counters intoOthe empty space. Only horizontal and vertical moves are allowed. Players thenMtake turns moving one of their counters into the empty space until one player!is "shut out" and thereby loses. then moves one of his own counters intoN It's a simple game, easy to learn and fun to play, but (like NIMROW) it'sLmore fun playing with a friend, because the computer (who likes and actually+insists on playing second) refuses to lose! ves one of his own counters intoO XB programmers will perhaps note a trick being used in the graphics of theLprogram. It is impossible to put more than four visible sprites in the sameOhorizontal line, but this program seems to do it, since all the moving counters4are obviously sprites. How is this effect achieved? O The secret is that there is no more than one sprite in view at a time (andKoften no sprites at all!). All of the counters are normally drawn graphicse all the moving countersJcharacters. When a counter is to be moved, a sprite of the same color andLshape is placed upon that spot, and the character underneath is erased. TheLsprite is then moved. When the sprite stops, the character is drawn beneathounters&the sprite, and the sprite is deleted. N In short, it's an optical illusion that can be used in any gameboard sitLuation where only one piece is being moved at a time. For example, the same the character is drawn beneathountersEtechnique could be used with a computer version of checkers or chess. L SHUTOUT does, however, make use of some assembly language routines fromNthe XBAL library, viz., my PEEKV and Curtis Provance's CHANGE. The purpose isountersOto speed up screen displays and the reading of data. The routines are embeddedBwithin the XB program by use of Todd Kaplan's fine ALSAVE program. L The book by Martin Gardner contains an analysis of the winning strategysountersIfor the game. The winning moves are determined by what might be called aM"domino analysis" of the board just after the first counter has been removed.MWhat you need to do is to picture the remaining squares covered with dominos,untersKwith each domino covering two squares. (Believe it or not, any arrangementJwill work, as long as you stay with the pattern for the rest of the game.)KWhen your opponent moves his piece, you just move your piece that is on thes,untersIother half of that domino. (As I hinted earlier, in this game the secondplayer can always win.) L The reason this strategy works is that (whatever arrangement of dominosis piece, you just move your piece that is on thes,untersNyou lay down in your mind) each domino covers two pieces: one of his, and oneKof yours. Therefore, whatever piece he moves, you will also have a move ofJyour own to make (i.e., the other piece on the domino to the newly vacatedsquare). N Covering the board with "invisible dominos" is not perhaps the easiest ofLmental exercises, but it is probably the easiest way to express the strategyNinvolved. If, however, this brief analysis is not sufficient, you may want toe). Jcheck out Martin Gardner, or give me a phone call at 215/4831379. In themeantime, enjoy! s, but it is probably the easiest way to express the strategyNinvolved. If, however, this brief analysis is not sufficient, you may want toe). #7
,.""$$$$$$~$t$j%`%'VL,B+8.$x~
5
5
5
5
6
7
,p
7
2
.
7$
5
7+
z5
p72
f5
\79
R
H$
>6
42
**
.
2
!N
.2%%%%e,3,2!V.22v5l4ob!^X*N"bD3:*0&4u7y 3
* Y4{ d%3 6%$% 0%%!%r7Uh7X^7^T,J,@,65,7j"+**+
*
)
)
*
5
2
2
+
,
,
6
,
6
x,
n6
d,
Z6
P
F7
<
27
(
7

+
5% 7s , 5+ 7m &9 51 7 , 57 7 7L 7O ~+ t,v j7@ `2 V7 L* B7 8!e .!v $7 7 7d *7.**(74/*%Q%Y%_%K&z&p7f0\8R H7F> 47*+ +(+M%%,U5,^4,g6 33.3I3c3}v3l3b3X+nN+rD+: p0 &+6#&a5=7&#7&5C7&*07'7r=h')^5IT'QJD@J6'y,Q"W'5O'^d)))'5U7(5[7(A5ax7n(id5gZ(P5mF(<5s2((5y55
) 5)15)Y5%?6&%E*6*0*^*j~rtkj60`*V+L66B685.!$"Z"^"Q!5F"?"!F!}/,!!!!""6<z p5f \/[R$MH#>$24$*# ###$`$${/5$S5//00h006Fv6Vl5b!
X1FN1D2:2X0&L}6`6q4444..6.Yr.h4R^6{T6J4@464,,4?"&!/)))))"###"#/66xndZ^
DSK1.LOADB7Phila., PA 191282TI BASIC or Extended BASICl3Released to Public Domain14by10B.A. Traver4835 Green Valley Drive2 TIC/TAC/TOE (PHILADELPHIA STYLE) BY B.A. TRAVER` FOR FURTHER INFORMATION, SEND S.A.S.E. TO B.A. TRAVER, 835 GREEN VALLEY DR., PHILA., PA 19128B FOR EXTENDED BASIC VERSION 100 THIS LINE SHOULD READ GOSUB 3800H TI BASIC OR EXTENDED BASIC (BUT SEE LINE 130 IF YOU HAVE VERSION 100)f WARNING: THIS GAME IS REALLY A CREAMCHEESE PUTON, FORPLAYED STRICTLYTHE 2ND PLAYER CAN'T WIN!!P$ Press any key when ready.DELAY
DELAY1D>^ 2) The game is ratherpredictable, with the firstplayer almost always openingO 1) The best the secondplayer can ordinarily hope
for is a tie.in the center square.f`TICTACTOE (Philadelphia Style) is like standard TicTacToe with two major differences:O TicTacToe is usually avery BORING game fortwo reasons:P$SCREEN4 CLEAR
M$M$.M$M$s.$M$You have now won ۷L game"M$I have now won ۷W game
M$M$.M$M$s.COLOR1388COLOR1488COLOR13216COLOR14216D135D45SOUND75030RP$$opportunity to win. Try it!P$`HCHARIJKK49C26C25C2M$
My move isC90B$C$D$D$D$E$D$D$D$E$D$D$D$C$B$E$A$ *********** *D$A$ * * *C$A$ *B$A$**************
A$ *SCREEN12I11194J12204KK1IJM$Another game (yes/no)?`>1311651962623303925236597841047R494144199991491914914141419IFII110_5T I C  T A C  T O E5(Philadelphia Style)6An Original ProgramSOUND6001850SOUND12513130SOUND2501310SOUND3001310SOUND1001470SOUND2001560SOUND2001310pK50\SOUND2001560SOUND3001310SOUND1001470ISOUND400FI0I1011JISOUND75FI0I110`J14W1>R20>SOUND350F100>LL1IHCHARI33228
I1924SOUND175FM0>WW1HCHARRWMCLM2P>!CHAR423366CC993366CC99'Mz
zz
\z'Mzz
P
<
<z
<'Mzz
xz
x
x'Mz
dz
z'Mz
(
zz
(
('Mzz
(
(
(z'Mz
dz
z'Mz
x
xz س
xz'Mz
( z
(
(z'Mz
<
<z
<z'Mz
x
x
x zz'Mzz
d
P
d
dz'Mz
<
<z
<z'Mz
z
Pz'Mzz
'Mzֳz
'Mz
P
P
P
P
Pz'Mz
<
<
<z
<
<'Mzz
'Mz
P
P
P
P
Pz'Mz
<x
<
<z
<
<R .M1M5M9'Mz"@^rzL0W0I
RWICLII19
R19
HCHARR33228R19 .'M1س(<PdM1zG1÷M5R24R23R22R21!HCHARRC2ܷطM$I1R19CC1C15շM$2C20C24C6C5$HCHARRWM1CLM2P1$HCHARRWM1CLM3P3 HCHARRWMCLM3P2IHCHARI912816I217SCREEN8Y1Y0Y0 `I
I1շM$'Mzz
<zz'Mz
zz
z'Mzz
d
pzzP140P136P128MM19M$۷M MK48K49K576$M$My move is ۷M and I win!M9M8M7M6M5M4M3M28M58M58M28M48M68M8M1888M$۷MM9M7M3CHARPATIB$ICHARI32S$5S$0000طB$14طB$74طB$134
I6590"CHAR139C0E070381C0E0600"CHAR13800060E1C3870E0C0"CHAR13703070E1C38706000"CHAR136006070381C0E0703)M$My move is ۷M, but you "win."M$Thank you for playing!M$No M$YesM$What's your move?M$Illegal moveI win!.(Here's how the playing boardis numbered:+10Number two?12Coward!110Number one?8You ARE brave!91Your choice (1 for strict, 2 for not so strict)?wits with a computer!)WSallow you to disregard it. After all, you do have the handicap of trying to matchVR(By the way, to give you every chance, I will myself follow that rule even if I1+blocking (or obtaining) threeinarow?TPDo you want me to be strict about your not occupying thecenter square other thanWRThis entertaining variation was invented to give the second player a more equalc_ the opponent from three in a row (or results in three in a row for the player!).UQ 2) Neither player can move in the center square unless that move blocksc_ 1) The first player must win to win (i.e., a 'tie' is a win for the second player!).
V
K89v
j
K78
HCHAR1219133HCHAR1214133HCHAR719133HCHAR714133VCHAR31913214VCHAR31413214HCHAR121013414HCHAR71013414CHAR131CHAR130CHAR129CHAR128CHAR134
000000FFFF
:
"CHAR143030706060C7CF0C0"CHAR142C0F07C0C06060703"CHAR141C0E06060303E0F03"CHAR140030F3E306060E0C0S0
.....
K49
KEY0KS GK48
7* * * * CLEAR .> CLEARSCREEN8 CLEARSCREEN12 CLEAR"CHAR133181818FFFF181818"CHAR1321818181818181818 CLEARSCREEN14R>
>M8M6M4M2>\>6 . .L10
. . . . . . . . .>?WINNING TICTAC/PHI (C) COPYRIGHT 1990 BY BARRY A. TRAVER M Contrary to appearances, TICTACTOE (Philadelphia Style) is not fairer to(the second player, but just the reverse! L Opening in a corner square rather than in the center is not the weakestKmove in normal TICTACTOE, but the strongest. In normal TICTACTOE, the onlyIresponse to an opening corner move that will not result in a loss for theOsecond player is to move in the center square. Since TICTAC/PHI outlaws such aMmove, it is impossible for the second player to win at TICTAC/PHI if the game.is played strictly according to the new rules. t in a loss for theK In other words, the game is a "setup." It sounds as if the rules areObeing revised to give the second player a better chance at winning, when really4the new rules make it a certainty that he will lose. a loss for the