IMD 1.18: 22/01/1996 8:23:56 micro cornucopia kaypro user group disk 29 games with source in turbo pascal   åååååååååå  WORDS DAT29-DISK DOC& BACCARATCHN BACCARATPAS3 BJGAME CHN"BJGAME PASM !"BLACKBOXCHN#$%&BLACKBOXPAS@'()*+,-.BLOCK CHN/01BLOCK PASI23456789:;BOGGLE CHN <=BOGGLE PAS>?@ACHUCKLCKCHN BCCHUCKLCKPASDEFGCRC COMHIJCRCKLISTCRC KLåå 11o[p;l;;;hellopeoplerhythmepickleejokeree;sldreetoldreewpgg\eeereg\ee a;sldkfd;l ado[p;l;;;hellopeoplerhythmepickleejokeree;sldreetoldreewpgg\eeereg\ee a;sldkfd;l adD COMMNODODGE CHN*PQRSTUDODGE PAS`VWXYZ[\]^_`aGAMEMENUCHNbGAMEMENUPAS cdGAMES COM?efghijklGAMES PASmGUESSIT CHNnGUESSIT PASopqHANGMAN CHNrsHANGMAN PAS,tuvwxyHORSERACCHNz{|HORSERACPAS$}~€�KENO CHN‚ƒKENO PAS#„…†‡ˆMAKEFILECHN‰ååMAKEFILEPAS Š‹READNUM PASŒååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååå  This is a disk of games with source in Turbo Pascal. To play GAMES type "GAMES" after the A>. Turbo Pascal's "Chain" procedure allows you to chain to another program compiled as a .CHN file. Such a file contains only program code, and uses the Pascal library already present in memory (loaded with the first program - GAMES). GAMES chains to GAMEMENU which chains to the game you choose to play. At the end of the game it chains back to GAMEMENU. I wrote GAMEMENU so all the gaches the waiting object. If it hits head on, the ball is absorbed, if it passed between two objects separated by one space, the ball is reflected back to the source, if it is adjacent to an object on the edge, the ball is reflected back to the source, if it is diagonal to an object, the ball is reflected at a right angle to the original path. BLOCK.PAS This is a block letter producer.  immediately. An example of counting; dealt an ace and a six, the player has a total of seven; dealt a jack and a three, the player has a total of three; dealt a five and an eight, the player has a total of three (thirteen minus ten). BJGAME.PAS This is the time honored game of blackjack. This is a pretty rudimentary version of the game as splitting and doubling down are not allowed. Blackjace horses start the race. Each horse has a different handicap which is a distance to run. Two dice are rolled and the horse represented by the total of the dice may be moved one length, or the horses represented by each die may be moved one length. KENO.PAS This is a version of the Las Vegas gambling game KENO. You are allowed to choose 8 numbers from 1 to 80. The computer will select 20mes could be distributed in executable form without including the run time module with every game: thus saving 8K of disk space per program. These programs were put together by a beginning Pascal programmer and should help others new to Turbo. They function fairly well as games. Instructions are provided by each program, and a brief description of each follows. BACCARAT.PAS Baccarat is a card game popular in Europe. It is a high stakes g BOGGLE.PAS This is a version of the ever popular number guessing game mastermind. CHUCKLCK.PAS This is a dice rolling game. You pick a number and bet that at least one of three dice rolled will be that number. DODGE.PAS This is a dodge'em type game where you are being pursued by various meanies and your object is to avoid them or preferrably destroy them. ks are honored and pay double. Blackjack pushes are won by the house. The dealer plays on even if you bust and thus can also bust. This is a push (no bet). BLACKBOX.PAS This a game to guess where a hidden object (or objects) are in a black box. You do this by shooting balls into the box and observing where they exit (if they exit). This is affected by the way the ball enetering approa numbers in the same range. You win based on how many of your numbers the computer also selected. MAKEFILE.PAS This is the program to create the word file for HANGMAN.PAS. ambling game favored by the rich (us poor types can't afford it). The player and the bank get two cards each. Tens and face cards count 0, number cards count their value and aces count one. Each player totals his cards modulo 10 (anything over 10 is dropped) and the higher total wins. An additional card may be added if desired. A total of 8 or 9 on the initial two cards is called a "NATURAL" and wins  GUESSIT.PAS This is the simpliest game, guessing a number between 1 and 100. You are told if you are high or low. HANGMAN.PAS This a typical hangman program. It has a list of words (see MAKEFILE.PAS), selects one and then you guess the letters in the word. Seven incorrect guesses cause the man to be hanged. HORSERAC.PAS This is a rather complicated horse race game. A series of twelv  1!€¯¸ÿÍ�!Ó)¶«ͲÃï&ýáá"ü«ýå*ü«^#Vë"á«!ã«Í+Í.Í_Íb!ã«Í *ü«å!߫͞*ß«å!ÑÍaËEÊV ÍRÍ�Please enter a numberÍ�Íb*á«ë*ü«s#r*ß«å!ÑÍNËEÊïÉ!}2Ø«!å! ÑÍ5z³Ê!Õ"Ù«!:¬å*Ù«+)Ñå*Ù«å! ÑÍå!Ñëás!:¬å*Ù«+)Ñå*Ø«&ëás!:¬å*Ù«+)Ñn&å! ÑÍNËEÊû *Ø«&å!ÑÍaËEÊô *Ø«&#}2Ø«Ãû !}2Ø«*Ù«#ÑÃy É!"z¯!å! ÑÍ5z³Ê|!Õ"Ï«! Íå!Ñ"Í«!:¬å*Í«+)ÑÑ«í°!:¬å*Í«+)Ñå!:¬å*Ï«+)ÑÑí°!:¬å*Ï«+)Ñå!Ñ«Ñí°*Ï«#ÑÃ!ÉýááË«í°ýå*Ë«&·íRª!ÍRÍ�Ace ÍbÄ"·íRÊú!·íRÊú!·íRÊú!«Í´ÍbÃÅ�ÍbÍRÍ� You have *2¬å!ÍöÍ�ÍbÍRÍ�ÍbÍRÍ�Want to try again? Íb!»Í8!/¬ÍÛÍbÃ'!þ«åÍ gamemenu.chnÍ=!þ«ÍRÍ�The player must take a cardÍ�Íb!8¬åÍ"#ÍRÍ�Íb*«&ËEÊP&*9¬&å!ÑͯËEÊM&ÍRÍ�The banker must take a cardÍ�Íb!9¬åÍ"#Ç&Í…#ËEʇ&ÍRÍ�The banker must take a cardÍ�Íb!9¬åÍ"#ÍRÍ�ÍbÍRÍ�The player's total is *8¬&å!ÍöÍ�ÍbÍRÍ�The banker's total is *9¬&å!ÍöÍ�ÍbÉ!Y}2/¬Íí!'"4¬!'"2¬Íg ! "z¯*/¬&Í(å!NÑÍaËEʰ)*/¬&Í(åÍQ!PÍa!BÍaÍ}îoËEÊ•'ÍRÍ�ÍbÍRÍ�)Do you want to be the banker, or player? Íb!»Í8!/¬ÍÛÍbÃ#'ÍRÍ�Íb*/¬&Í(å!PÑÍNËEÊÌ'ÍRÍ�Bet? Íb!0¬åÍç*) compbank : boolean; (* whether the computer is the banker *) dummy : file; {$I readnum} (* * makedeck * create the deck *) procedure makedeck; var decknum : decktype; suit : suittype; value : 1..13; begin suit := hearts; for decknum := 1 to decksize do begin deck[decknum].value := decknum mod 13 + 1; deck[decknum].suit := suit; if deck[decknum].value = 13 then if suit <> spades then suit := suc·íRÊú!·íRÊú!·íRÊú!·íRÊú! ·íRÂ"*Ë«&ÍRå!ÍöÍ� ÍbÄ" ·íRÂ3"ÍRÍ�Ten ÍbÄ" ·íRÂO"ÍRÍ�Jack ÍbÄ" ·íRÂk"ÍRÍ�QueenÍbÄ" ·íR„"ÍRÍ�King ÍbÍRÍ� of Íb*Ì«&·íRµ"ÍRÍ�Hearts ÍbÃ#·íRÂÔ"ÍRÍ�DiamondsÍbÃ#·íRÂó"ÍRÍ�Clubs ÍbÃ#·íRÂ#ÍRÍ�Spades ÍbÍRÍ� ÍbÉÃè$ýáá"À«ýå!:¬å*z¯+)ÑåÍ}!!:¬å*z¯+)Ñn&å! Ñ͇ËEÊx#*À«n&å!:¬å*z¯+)Ñn&Ñå! ÑÍë*À«s*z¯å!Ñ"z¯É!:¬å*z¯å!Ñë·íR+)Ñn&å! ÑÍtËEʳ#!}2¶«ÃÎ#!:¬å*z¯å!Ñë·íR+)Ñn& (* * baccarat * plays the card game of baccarat *) program baccarat (input, output); const decksize = 416; (* size of 8 decks *) start = 10000; (* the amount of money you start with *) type suittype = (hearts,clubs,diamonds,spades); card = record value : 1..13; suit : suittype end; handvalue = 0..9; decktype = 1..decksize; stand = set of handvalue; var cardnum : decktype; (* current card we are playing *) deck Ã(!'Íå! Ñ"0¬*0¬å! ÑÍÞ"0¬*0¬å! ÑÍÄ"0¬ÍRÍ� The bet is *0¬å!ÍöÍ�ÍbÍ#Íí*/¬&å!bÑÍNå*/¬&å!BÑÍNÑ}³oËEÊX(*8¬&}27¬*9¬&}26¬Ãj(*9¬&}27¬*8¬&}26¬*9¬&å*8¬&ÑÍNËEÊ‘(ÍRÍ�TieÍ�ÍbÃ)*7¬&å*6¬&ÑÍ›ËEÊä(ÍRÍ�The computer has wonÍ�Íb*4¬å*0¬Ñ"4¬*2¬å*0¬Ñë·íR"2¬Ã)ÍRÍ� You won!!!Íb*4¬å*0¬Ñë·íR"4¬*2¬å*0¬Ñ"2¬ÍRÍ�ÍbÍRÍ� Totals are:Í�ÍbÍRÍ� Computer has *4¬å!ÍöÍ�ÍbÍRÍ� You have *2¬å!ÍöÍ�ÍbÍRÍ�ÍbÍRÍ�Want to try again? Íb!»Í8!/¬ÍÛÍbÃ'!þ«åÍ gamemenu.chnÍ=!þc(suit) else suit := hearts end end; (* * shuffle * go through the deck exchanging cards *) procedure shuffle; var tmp : card; decknum, newnum : decktype; begin cardnum := 1; for decknum := 1 to decksize do begin newnum := random(decksize) + 1; tmp := deck[newnum]; deck[newnum] := deck[decknum]; deck[decknum] := tmp end end; (* * showcard * prints out a card in a readable format *) procedure sh}2¶«!}2»«*¶«&·íRÊí# ·íR $*9¬&å!ÑÍtËEÊ$!}2»«Ãâ$·íRÂ/$*9¬&å!ÑÍtËEÊ,$!}2»«Ãâ$·íRÊC$·íRÂ_$*9¬&å!ÑÍNËEÊ\$!}2»«Ãâ$·íRÊs$·íRÂ�$*9¬&å!ÑÍtËEÊŒ$!}2»«Ãâ$·íRÊ£$·íR¿$*9¬&å!ÑÍtËEʼ$!}2»«Ãâ$·íRÂâ$*9¬&å!ÑÍtËEÊâ$!}2»«*»«&É!}2«!}29¬!}28¬*z¯å! å!Ñë·íRÑÍ›ËEÊ%Í!ÍRÍ�"Player's hand Banker's handÍ�Íb!8¬åÍ"#!9¬åÍ"#ÍRÍ�Íb!8¬åÍ"#!9¬åÍ"#ÍRÍ�Íb*9¬&å!ÑÍtå*8¬&å!ÑÍtÑ}³oËEʱ%ÍRÍ�NaturalÍ�ÍbÃ�&*8¬&å!Ñ͇ËEÊù%!}2 : array [decktype] of card; (* the deck *) bankhand : handvalue; (* the banker's hand *) playhand : handvalue; (* the player's hand *) comphand : handvalue; (*value of the computer's hand *) humhand : handvalue; (* the value of the human's hand *) compmoney : integer; (* the computer's money *) hummoney : integer; (* the player's money *) bet : integer; (* the size of the bet *) ch : char; (* used to answer questions   owcard (display:card); begin case display.value of 1: write('Ace '); 2,3,4,5,6,7,8,9: write(display.value:1,' '); 10: write('Ten '); 11: write('Jack '); 12: write('Queen'); 13: write('King ') end; write(' of '); case display.suit of hearts : write('Hearts '); diamonds : write('Diamonds'); clubs : write('Clubs '); spades : write('Spades ') end; write(' ') end; (* * play * deal the cardnkhand) end; writeln end; writeln('The player''s total is ',playhand); writeln('The banker''s total is ',bankhand) end; (* Play *) begin ch := 'Y'; randomize; compmoney := start; hummoney := start; makedeck; cardnum := decksize; while upcase(ch) <> 'N' do begin while not (upcase(ch) in ['P','B']) do begin writeln; write('Do you want to be the banker, or player? '); read(trm,ch) end; w bankdeal := false; 1: if bankhand >= 4 then bankdeal := false end end; (* BankDeal *) begin (* Play *) stood := true; bankhand := 0; playhand := 0; if cardnum > (decksize - 7) then shuffle; writeln('Player''s hand Banker''s hand'); cardeal(playhand); cardeal(bankhand); writeln; cardeal(playhand); cardeal(bankhand); writeln; if (bankhand >= 8) or (playhand >= 8) then writeln('Natural')  hummoney := hummoney + bet end end; writeln; writeln('Totals are:'); writeln('Computer has ',compmoney); writeln('You have ',hummoney); writeln; write('Want to try again? '); read(trm,ch) end; assign(dummy,'gamemenu.chn'); chain(dummy) end. s, then decide if we need to ake any cards *) procedure play; var stood : boolean; (* if the player stood *) (* * cardeal * actually deals a card out *) procedure cardeal(var addto:handvalue); begin showcard(deck[cardnum]); if deck[cardnum].value <= 9 then addto := (addto + deck[cardnum].value) mod 10; cardnum := cardnum + 1 end; (* * bankdeal * decide if the bank should have a card dealt to it *) function bankdeal: boolean; var lastval : riteln; if upcase(ch) = 'P' then begin write('Bet? '); readint(bet) end else begin (* * the computer is the player so it makes a random bet *) bet := random(start) + 10; bet := bet div 10; bet := bet * 10; writeln('The bet is ',bet) end; play; randomize; if (ch = 'b') or (ch = 'B') then begin comphand := playhand; humhand := bank else begin if playhand <= 5 then begin stood := false; writeln('The player must take a card'); cardeal(playhand) end; writeln; if stood then begin if bankhand < 6 then begin writeln('The banker must take a card'); cardeal(bankhand) end end else if bankdeal then begin writeln('The banker must take a card'); cardeal(ba0..9; (* the value of the last card *) begin if deck[cardnum - 1].value >= 10 then lastval := 0 else lastval := deck[cardnum-1].value; bankdeal := true; case lastval of 0,9: if bankhand >= 4 then bankdeal := false; 8: if bankhand >= 3 then bankdeal := false; 7,6: if bankhand = 7 then bankdeal := false; 5,4: if bankhand >= 6 then bankdeal := false; 3,2: if bankhand >= 5 then hand end else begin comphand := bankhand; humhand := playhand end; if bankhand = playhand then writeln('Tie') else begin if comphand > humhand then begin writeln('The computer has won'); compmoney := compmoney + bet; hummoney := hummoney - bet end else begin write('You won!!!'); compmoney := compmoney - bet;   1!€¯¸ÿÍ�!Æ0B­ͲÃ60ýáá"ü­ýå*ü­^#Vë"á­!ã­Í+Í.Í_Íb!ã­Í *ü­å!ß­Íž*ß­å!ÑÍaËEÊV ÍRÍ�Please enter a numberÍ�Íb*á­ë*ü­s#r*ß­å!ÑÍNËEÊïÉýááÜ­í°ýåÍRÍ�the !l®å*Ý­&)]T)ÑÍ !ÍqÍbÍRÍ� of !º®å*Ü­&å)))ÑÑÍ !ÍqÍ�ÍbÉÍR! e.å!ÍqÍ�Blackjack for oneÍ�ÍbÍRÍ�Do you want instructions? Íb!»Í8!Ó­ÍÛÍbÍRÍ�Íb*Ó­&Í(å!YÑÍNËEÊò!ÍRÍ�9This program plays a simple version of blackjack. NeitherÍ�ÍbÍRÍ�9splitting, nor modification of the bet after the hand has!å!ÍöÍ� and !Èå!ÍöÍ�ÍbÍRÍ�8and must be no larger than the amount of money you have.Í�ÍbÍRÍ�Enter 0 to leave.Í�ÍbÍRÍ�-Size of bet (0 to end, cr for same as last)? Íb!0®åÍçÃs)*0®å!ÑÍNËEÊñ*ÍRÍ�You have quit with $*2®å!Íö!.ÍòÍ�Íb!þ­åÍ gamemenu.chnÍ=!þ­Í´ÍbÉ!C®å!+å)ÑÑå!à®åÍ '+å)ÑÑÑí°!4®å!+å)ÑÑå!à®åÍ '+å)ÑÑÑí°!C®å!+å)ÑÑå!à®åÍ '+å)ÑÑÑí°!4®å!+å)ÑÑå!à®åÍ '+å)ÑÑÑí°ÍRÍ� You drew Íb!C®å!+å)ÑÑåÍg ÍRÍ�and Íb!C®å!+å)ÑÑåÍg ÍRÍ�+å)ÑÑå!�­Ñí°É!"›­!å!ÑÍ5z³Ê &Õ}2ž­!å! ÑÍ5z³Ê•&Õ}2�­!à®å*›­+å)ÑÑ"Ÿ­*ž­&ë*Ÿ­s*Ÿ­å*�­&ëás!à®å*›­+å)ÑÑå!C®åÍü!å!à®å*›­+å)ÑÑå!4®åÍü!Ñ}³o}îoËEÊŠ&*Ÿ­å!ëás*›­å!Ñ"›­*�­&#ÑÃ&*ž­&#ÑÃì%!".®*›­å!Ñë·íR"Þ®ÍRÍ�*** *Þ®å!ÍöÍ� cards left.Í�Íb!å*Þ®ÑÍ5z³Ê 'Õ"›­*›­å*Þ®å͇"åÍ}%*›­#ÑÃë&É*Þ®å!ÑͯËEÊ<'ÍRÍ�Reshuffling ...Í�ÍbÍz%*.®å!Ñ".®!à®å*.®+å)ÑÑå!ëás*Þ®å!Ñë·íR"Þ®*.®"Ž­*Ž­Éýááy­í°ýå!"q­!"o­!å!ÑÍ5z³Ê$(Õ"s­!y­å*s­+å)ÑÑn&å!ÑÍNËEÊ(Í� You lose.Í�Íb*2®å*0®Ñë·íR"2®Ã0ÍRÍ�You winÍ�Íb*2®å*0®Ñ"2®ÍRÍ� You now have $*2®å!ÍöÍ�ÍbÉÍá"Íz%Í5)ÍcÍò*!C®åÍo(}îoËEÊX0Í,Í\-Í.!C®åÍ¢"!4®åÍ¢"*2®å!Ñ͇ËEÊ<0ÍRÍ�You have run out of money.Í�Íb!þ­åÍ gamemenu.chnÍ=!þ­Í´ÍbÃÅC®åÍ�ÍbÍRÍ�been dealt is allowed.Í�ÍbÍRÍ�ÍbÉýááÀ­í°áÏ­í°ýå!}2Ò­!å!ÑÍ5z³Ê�"Õ"º­*Ï­&å!À­å*º­+å)ÑÑn&ÑÍNå*Э&å!À­å*º­+å)ÑÑn&ÑÍNÑ}£oËEÊx"!}2Ò­*º­#ÑÃ$"*Ò­&Éýáá"¶­ýå!å*¶­ÍÑ"¸­*¸­Éýáá"°­ýå!å!ÑÍ5z³Êà"Õ"ª­*°­å*ª­+å)ÑÑå!ëás*ª­#Ñõ"ÉÍÇ !C®åÍ¢"!4®åÍ¢"!d"2®!"Þ®!"¤­!å!ÑÍ5z³ÊE#Õ}2£­!R®å*£­&)Ñå*¤­ëás#r*¤­å!Ñ"¤­*£­&#ÑÃ#! å! ÑÍ5z³Êz#Õ}2£­!R®å*£­&)Ñå! ëás#r*£­&#ÑÃP#!R®å! )Ñå! ëás#r!l®å!)]T)ÑåÍtwoÍÑ!l®å!)]T)ÑåÍthreeÍÑ!l®åÍbÍRÍ�The dealer's up card is Íb!4®å!+å)ÑÑåÍg É!"M­!y}2L­*M­å!Ñ͇å!C®åÍz'å!ÑͯÑ}£oå*L­&Í(å!YÑÍNÑ}£oËEÊ-ÍRÍ�Your count is !C®åÍz'å!ÍöÍ�ÍbÍRÍ�Hit? Íb!»Í8!L­ÍÛÍbÍRÍ�Íb*L­&Í(å!YÑÍNËEÊ-!C®å*M­+å)ÑÑå!à®åÍ '+å)ÑÑÑí°ÍRÍ� You drew Íb!C®å*M­+å)ÑÑåÍg *M­å!Ñ"M­Ã,!C®åÍz'å!Ñͯå*M­å!ÑÍ›Ñ}£oËEÊ[-ÍRÍ�You can take only !å!ÍöÍ� cards.Í�ÍbÉÍRÍ�ÍbÍRÍ�Dealer's hole card is Íb!4®å!+å)ÑÑåÍg !"F­*F­å!Ñ͇å!4®åÍz'å!ÑͯÑ}£oËEÊ.!4®å*F­+!y­å*s­+å)ÑÑ"u­*u­n&å! ÑÍNËEÊý'*o­å!Ñ"o­*q­å!R®å*u­n&)Ñ^#VëÑ"q­*s­#ÑÞ'*o­å!ÑÍ›å*q­å!ÑÍ›Ñ}£oËEÊe(*o­å!Ñë·íR"o­*q­å! Ñë·íR"q­Ã$(*q­"ˆ­*ˆ­Éýáá_­í°ýå!R®å!_­å!+å)ÑÑn&)Ñ^#Vëå! ÑÍNå!R®å!_­å!+å)ÑÑn&)Ñ^#Vëå! ÑÍNÑ}£oå!R®å!_­å!+å)ÑÑn&)Ñ^#Vëå! ÑÍNå!R®å!_­å!+å)ÑÑn&)Ñ^#Vëå! ÑÍNÑ}£oÑ}³o}2n­*n­&ÉÍRÍ�-Size of bet (0 to end, cr for same as last)? Íb!0®åÍç*0®åÍQ!Ía!å!ÈÍkÍ}îoå*0®å*2®ÑÍ›Ñ}³oËEÊ�*ÍRÍ�A bet must be between ÍbÍR!)]T)ÑåÍfourÍÑ!l®å!)]T)ÑåÍfiveÍÑ!l®å!)]T)ÑåÍsixÍÑ!l®å!)]T)ÑåÍsevenÍÑ!l®å!)]T)ÑåÍeightÍÑ!l®å!)]T)ÑåÍnineÍÑ!l®å!)]T)ÑåÍtenÍÑ!l®å! )]T)ÑåÍjackÍÑ!l®å! )]T)ÑåÍqueenÍÑ!l®å! )]T)ÑåÍkingÍÑ!l®å! )]T)ÑåÍaceÍÑ!º®å!å)))ÑÑåÍdiamondsÍÑ!º®å!å)))ÑÑåÍspadesÍÑ!º®å!å)))ÑÑåÍheartsÍÑ!º®å!å)))ÑÑåÍclubsÍÑÍíÉÃÛ%ýáá"—­á"™­ýå!à®å*™­+å)ÑÑ�­í°!à®å*™­+å)ÑÑå!à®å*—­+å)ÑÑÑí°!à®å*—­å)ÑÑå!à®åÍ '+å)ÑÑÑí°ÍRÍ� Dealer drew Íb!4®å*F­+å)ÑÑåÍg *F­å!Ñ"F­Ã�-ÉÍRÍ�ÍbÍRÍ� Dealer has !4®åÍz'å!Íö!.ÍòÍ�Íb!4®åÍo(ËEÊ�.ÍRÍ�Dealer got a blackjack.Íb*2®å*0®Ñë·íR"2®Ã0!C®åÍo(ËEÊÑ.ÍRÍ�Your blackjack wins!Íb*2®å*0®å!ÑÍÄÑ"2®Ã0!C®åÍz'å!ÑÍ›ËEÊK/ÍRÍ� You busted.Íb!4®åÍz'å!ÑÍ›ËEÊ9/ÍRÍ� So did the dealer. No payout.ÍbÃH/*2®å*0®Ñë·íR"2®Ã0!4®åÍz'å!ÑÍ›ËEÊ…/ÍRÍ� Dealer busts.Íb*2®å*0®Ñ"2®Ã0!4®åÍz'å!C®åÍz'ÑÍNËEʯ/ÍRÍ�Push.ÍbÃ0!4®åÍz'å!C®åÍz'ÑÍ›ËEÊï/ÍR  program bjgame; const decksize = 52; maxhandsize = 5; mincards = 5; dealerstays = 17; busted = 21; startamount = 100; minbet = 2; maxbet = 200; type cardsuit = (spades, hearts, clubs, diamonds); cardvalue = (duece, three, four, five, six, seven, eight, nine, ten, jack, queen, king, ace); cardstate = (picked, indeck); card = record suit : cardsuit; value : cardvalue; state : cnstructions; clearhand(player); clearhand(dealer); money := startamount; cardsleft := 0; i := 2; for cardval := duece to ten do begin countvalue[cardval] := i; i := i + 1; end; for cardval := jack to king do countvalue[cardval] := 10; countvalue[ace] := 11; valuename[duece] := 'two'; valuename[three] := 'three'; valuename[four] := 'four'; valuename[five] := 'five'; valuename[six] := 'six'; valuename[seven] := 'sting, nor modification of the bet after the hand has'); writeln('been dealt is allowed.'); end; writeln; end; (* * returns true if the card c is in the hand *) function inhand(c: card; whose: hand): boolean; var handindex : integer; begin inhand := false; for handindex := 1 to maxhandsize do if ((c.suit = whose[handindex].suit) and (c.value = whose[handindex].value)) then begin inhand := true; end; end; (* *  begin suit := asuit; value := avalue; if not (inhand(deck[i], player) or inhand(deck[i], dealer)) then begin state := indeck; i := i + 1; end; end; curcard := 0; cardsleft := i - 1; writeln('*** ',cardsleft:1,' cards left.'); for i := 1 to cardsleft do swapcard(i, randcard(cardsleft)); end; (* * returns the index into the deck of the next card. calls shuffle if deck * is nearly finisheardstate; end; hand = array [1..maxhandsize] of card; var deck : array[1..decksize] of card; cardsleft : integer; suitname : array[cardsuit] of string[8]; valuename : array[cardvalue] of string[5]; countvalue : array[cardvalue] of integer; player : hand; dealer : hand; money : integer; bet : integer; curcard : integer; dummy : file; {$i readnum} (* * write the suit and value of aeven'; valuename[eight] := 'eight'; valuename[nine] := 'nine'; valuename[ten] := 'ten'; valuename[jack] := 'jack'; valuename[queen] := 'queen'; valuename[king] := 'king'; valuename[ace] := 'ace'; suitname[diamonds] := 'diamonds'; suitname[spades] := 'spades'; suitname[hearts] := 'hearts'; suitname[clubs] := 'clubs'; randomize; end; (* * shuffles the cards that are not in either player's hand. the initial shuffle * does all the cards becaureturns a random index into the deck *) function randcard(l: integer) : integer; begin randcard := 1 + random(l); end; (* * removes all cards from the argument hand *) procedure clearhand(var ahand: hand); var handindex : integer; begin for handindex := 1 to maxhandsize do ahand[handindex].state := indeck; end; (* * initialize the names of the suits and values *) procedure initialize; var i : integer; cardval : cardvalue; begin id. *) function pickcard : integer; begin if cardsleft < mincards then begin writeln('Reshuffling ...'); shuffle; end; curcard := curcard + 1; deck[curcard].state := picked; cardsleft := cardsleft - 1; pickcard := curcard; end; (* * determines the sum of the values in a hand. a card's state must be * 'picked' for it to be included. aces are assumed to be 11. if the * count is over 21 and there are aces in it, as many as are needed * will b card *) procedure printcard(acard: card); begin write('the ',valuename[acard.value]); writeln(' of ',suitname[acard.suit]); end; (* * asks for intructions *) procedure instructions; var response : char; begin writeln(' ':15,'Blackjack for one'); write('Do you want instructions? '); read(trm,response); writeln; if upcase(response) = 'Y' then begin writeln('This program plays a simple version of blackjack. Neither'); writeln('splitse both hands start empty. *) procedure shuffle; var asuit : cardsuit; avalue : cardvalue; i : integer; (* * exchange the cards at the two positions in the deck *) procedure swapcard(first, second : integer); var tempcard : card; begin tempcard := deck[first]; deck[first] := deck[second]; deck[second] := tempcard; end; begin i := 1; for asuit := spades to diamonds do for avalue := duece to ace do with deck[i] do   e devalued to 1. *) function countcards(someone: hand): integer; var handindex, sum, numaces : integer; begin sum := 0; numaces := 0; for handindex := 1 to maxhandsize do if someone[handindex].state = picked then with someone[handindex] do begin if value = ace then numaces := numaces +1; sum := sum + countvalue[value]; end; while (numaces > 0) and (sum > busted) do begin numaces := numaces - 1 atcard := atcard + 1; end; end; (* while *) if (countcards(player) < busted) and (atcard > maxhandsize) then writeln('You can take only ',maxhandsize:1,' cards.'); end; (* PlayerTakes *) procedure dealertakes; var atcard : integer; begin writeln; write('Dealer''s hole card is '); printcard(dealer[1]); atcard := 3; while (atcard <= maxhandsize) and (countcards(dealer) < dealerstays) do begin dealer[atcard] := deck[pickcard chain(dummy) end; end; (* * deals the cards to both participants for this hand *) procedure dealhands; begin player[1] := deck[pickcard]; dealer[1] := deck[pickcard]; player[2] := deck[pickcard]; dealer[2] := deck[pickcard]; write('You drew '); printcard(player[1]); write('and '); printcard(player[2]); writeln; write('The dealer''s up card is '); printcard(dealer[2]); end; (* * asks the player if more cards are wanted. *) procedure money - bet end else begin writeln('You win'); money := money + bet; end; writeln(' You now have $',money:1); end; (* main program *) begin initialize; shuffle; repeat getbet; clrscr; dealhands; if not blackjack(player) then playertakes; dealertakes; whowon; clearhand(player); clearhand(dealer); until money <= 0; writeln('You have run out of money.'); assign(dummy,'gameme; sum := sum - 10; end; countcards := sum; end; (* * returns true if the argument hand is a blackjack *) function blackjack(someone: hand): boolean; begin blackjack := ((countvalue[someone[1].value] = 10) and (countvalue[someone[2].value] = 11)) or ((countvalue[someone[1].value] = 11) and (countvalue[someone[2].value] = 10)); end; procedure getbet; const betprompt = 'Size of bet (0 to end, cr for same as last]; write('Dealer drew '); printcard(dealer[atcard]); atcard := atcard + 1; end; end; procedure whowon; begin writeln; writeln('Dealer has ',countcards(dealer):1,'.'); if blackjack(dealer) then begin write('Dealer got a blackjack.'); money := money - bet; end else if blackjack(player) then begin write('Your blackjack wins!'); money := money + (bet * 2) end else if countcards(player) > busted then  playertakes; var atcard : integer; answer : char; begin atcard := 3; answer := 'y'; while (atcard <= maxhandsize) and (countcards(player) < busted) and (upcase(answer) = 'Y') do begin writeln('Your count is ',countcards(player)); write('Hit? '); read(trm,answer); writeln; if upcase(answer) = 'Y' then begin player[atcard] := deck[pickcard]; write('You drew '); printcard(player[atcard]); nu.chn'); chain(dummy); end. )? '; begin write(betprompt); readint(bet); while not (bet in [0,minbet..maxbet]) or (bet > money) do begin write('A bet must be between '); writeln(minbet:1,' and ',maxbet:1); writeln('and must be no larger than the amount of money you have.'); writeln('Enter 0 to leave.'); write(betprompt); readint(bet); end; if bet = 0 then begin writeln('You have quit with $',money:1,'.'); assign(dummy,'gamemenu.chn');  begin write('You busted.'); if countcards(dealer) > busted then write(' So did the dealer. No payout.') else money := money - bet; end else if countcards(dealer) > busted then begin write('Dealer busts.'); money := money + bet; end else if countcards(dealer) = countcards(player) then write('Push.') else if countcards(dealer) > countcards(player) then begin writeln('You lose.'); money :=  1!€¯¸ÿÍ�!—,|®ͲÃe,ýáá"â®ýå*â®^#Vë"Ç®!É®Í+Í.Í_Íb!É®Í *â®å!Ů͞*Å®å!ÑÍaËEÊV ÍRÍ�Please enter a numberÍ�Íb*Ç®ë*â®s#r*Å®å!ÑÍNËEÊïÉÃŽ$*¯&å!ÑÍNå*¯&å!ÑÍNÑ}³oËEÊá !¯å*¾®&å!Ñë·íR)å))ÑÑå*½®&Ñn&å!¯å*¾®&å!Ñ)å))ÑÑå*½®&Ñn&Ñ}³o}2¼®Ã1!!¯å*¾®&)å))ÑÑå*½®&å!Ñë·íRÑn&å!¯å*¾®&)å))ÑÑå*½®&å!ÑÑn&Ñ}³o}2¼®*¼®&É*¯&·íRÂj!*î&å!Ñë·íRå!ÑÍå!ÑÍN}2·®Ã"·íR¢!*î&å!Ñë·íRå!ÑÍå!å!Ñë·íRÑÍN}2·®Ã"·íRÂÑ!*î&å!Ñë·íRå!ÑÍÞå!ÑÍNld I shoot now? Íb!�®åÍç*�®åÍQ!å! ÍkÍ}îoËEÊ^*ÍRÍ�&Sorry, but only numbers between 0 and ! å!ÍöÍ�ÍbÍRÍ� Start where? Íb!�®åÍçÃã)*�®å!ÑÍaËEÊý*ÍRÍ�in at *�®å!Íö! ÍòÍb!}2Ž®!�®åÍë'*�®åÍg }2Ž®*Ž®&å!ÑÍNËEÊÑ*ÍRÍ�AbsorbedÍ�ÍbÃý*ÍRÍ�It came out at *Ž®&åÍ)å!ÍöÍ�Íb*�®å!ÑÍNËEʸ)ÉÍRÍ� 32 31 30 29 28 27 26 25Í�ÍbÍRÍ� -------------------------Í�Íb!å!ÑÍ5z³Ê,Õ}2}®*}®&ÍRå!Íö!(ÍòÍb!å!ÑÍ5z³Êç+Õ}2|®!¯å*}®&)å))ÑÑå*|®&Ñn&ËEÊÏ+ÍRÍ�* îåÍú#*î&åÍg }2Ä®ÃÃ&Í "ËEÊ;&*¯&·íRÊÿ%·íR &!}2¯Ã$&·íRÊ&·íRÂ$&!}2¯!îåÍú#*î&åÍg }2Ä®ÃÃ&Í #ËEÊ—&*¯&·íRÊ[&·íRÂe&!}2¯Ã€&·íRÊy&·íR€&!}2¯!îåÍú#*î&åÍg }2Ä®ÃÃ&Í7!}îoËEʺ&!îåÍú#*î&åÍg }2Ä®ÃÃ&*î&}2Ä®*Ä®&É!å! ÑÍ5z³Ê)'Õ}2ž®!å! ÑÍ5z³Ê'Õ}2�®!¯å*ž®&)å))ÑÑå*�®&Ñå!ëás*�®&#ÑÃé&*ž®&#ÑÃÔ&ÉÍíÍÉ&ÍRÍ�ÍbÍRÍ�How many balls? Íb!¯åÍçÍí!"•®*•®å*¯ÑͯËEÊç'!å!ÍÑ}2˜®!å!ÍÑ}2—®!¯å*˜®&)å))ÑÑå*—®&Ñn&}îoËEÊä'!¯å*˜®&)å))ÑÑ(* * blackbox * try to determine the location of n balls in a black box *) program blackbox(input, output); const side = 8; (* there are 8 squares to a side *) siden1 = 9; (* the length of one side plus one *) maxstart = 32; (* maximum possible location for ray *) absorbed = 0; (* what track returns when ray absorbed *) boxsize = 64; (* size of the box *) type course = (up,down,left,right); (* possible directions for rays *) lines }2·®Ã"·íRÂ"*î&å!Ñë·íRå!ÑÍÞå!å!Ñë·íRÑÍN}2·®*·®&É*¯&·íRÂO"!¯å*¾®&å!Ñë·íR)å))ÑÑå*½®&å!Ñë·íRÑn&}2²®Ã#·íR‹"!¯å*¾®&å!Ñë·íR)å))ÑÑå*½®&å!ÑÑn&}2²®Ã#·íRÂÊ"!¯å*¾®&å!Ñë·íR)å))ÑÑå*½®&å!Ñë·íRÑn&}2²®Ã#·íRÂ#!¯å*¾®&å!Ñ)å))ÑÑå*½®&å!Ñë·íRÑn&}2²®*²®&É*¯&·íRÂI#!¯å*¾®&å!Ñ)å))ÑÑå*½®&å!Ñë·íRÑn&}2­®Ãô#·íR‚#!¯å*¾®&å!Ñ)å))ÑÑå*½®&å!ÑÑn&}2­®Ãô#·íR¾#!¯å*¾®&å!Ñë·íR)å))ÑÑå*½®&å!ÑÑn&}2­®Ãô#·íRÂô#!ÍbÃÜ+ÍRÍ�. Íb*|®&#ÑÔ+ÍR!)Íò!å*}®&Ñë·íRå!ÍöÍ�Íb*}®&#ÑÃg+ÍRÍ� -------------------------Í�ÍbÍRÍ� 9 10 11 12 13 14 15 16Í�ÍbÉÍÉ&Í+Í*'Íè'Í+!ä®åÍ gamemenu.chnÍ=!ä®Í´ÍbÃÅRÍ� -------------------------Í�ÍbÍRÍ� 9 å*—®&Ñå!ëás*•®å!Ñ"•®Ãc'Éø)ýáá"Œ®ýå*Œ®^#Vëå!ÑÍaËEÊ)*Œ®^#Vëå!Ñ͇ËEÊJ(!}2¯*Œ®^#Vëå!Ñë·íRå!ÑÍÄå!Ñë*Œ®s#rÃ)*Œ®^#Vëå!å!ÑÑ͇ËEÊ™(!}2¯!ÍÂå!å!ÑÍÄå*Œ®^#VëÑë·íRÑë·íRë*Œ®s#rÃ)*Œ®^#Vëå!å!ÑÍÄÑ͇ËEÊì(!}2¯!å!ÑÍÄå*Œ®^#VëÑë·íRå!Ñå!ÑÍÄë*Œ®s#rÃ)!}2¯!å!ÑÍÄå*Œ®^#VëÑë·íRå!Ñë*Œ®s#rÉýáá}2†®ýå*¯&·íRÂJ)*†®&å!ÑÍÞå!Ñ}2‡®Ã²)·íRÂw)*†®&å!å!Ñë·íRÑå!ÑÍÞ}2‡®Ã²)·íR–)!!å*†®&Ñë·íR}2‡®Ã²)·íR²)*†®&å!0Ñë·íR}2‡®*‡®&ÉÍRÍ�Where shou = array[0..siden1] of boolean; (* possible locations in the box *) location = 0..boxsize; (* 0 is for absorption *) var box : array[0..siden1] of lines; (* the black box *) direction : course; (* the ray's current direction *) startray : 1..maxstart; (* the ray's starting location *) numballs : integer; (* the number of balls *) dummy : file; {$I readnum } (* * track * recursive functi¯å*¾®&å!Ñ)å))ÑÑå*½®&å!ÑÑn&}2­®*­®&Éýáá"§®ýåÍ7!}îoËEÊ�$*¯&·íRÂ3$*§®n&å!Ñë·íRë*§®sÃ�$·íRÂQ$*§®n&å!Ñë*§®sÃ�$·íRÂr$*§®n&å!Ñë·íRë*§®sÃ�$·íRÂ�$*§®n&å!Ñë*§®sÉýáá}2îýå*î&å!Ñë·íRå!ÑÍÞå!Ñ}2¾®*î&å!Ñë·íRå!ÑÍå!Ñ}2½®!¯å*¾®&)å))ÑÑå*½®&Ñn&ËEÊ%!}2Ä®ÃÃ&Íj ËEÊg%*¯&·íRÂ"%!}2¯Ã[%·íRÂ6%!}2¯Ã[%·íRÂJ%!}2¯Ã[%·íRÂ[%!}2¯*î&}2Ä®ÃÃ&Í "åÍ #Ñ}£oËEÊß%*¯&·íRÂ�%!}2¯ÃÈ%·íR£%!}2¯ÃÈ%·íR·%!}2¯ÃÈ%·íRÂÈ%!}2¯!  on that follows a ray's course through the box *) function track(place:location):location; var rownum : 1..side; colnum : 1..side; (* * onside * tests to see if there is a ball on either side of a ray *) function onside:boolean; begin if (direction = right) or (direction = left) then onside := box[rownum-1][colnum] or box[rownum+1][colnum] else onside := box[rownum][colnum-1] or box[rownum][colnum+1] end; (* * edge * tests if a ray has reached the up : direction := down; down : direction := up end; change(place); track := track(place) end else begin if diagup then begin case direction of left, right : direction := down; up,down : direction := right end; change(place); track := track(place) end else  * change * moves the ray one square in the current direction *) procedure change(var num:location); begin (* if we are on an edge, then don't move *) if not edge then case direction of left : num := num - 1; right: num := num + 1; up : num := num - side; down : num := num + side end end; (* * track *) begin rownum := (place - 1) div side + 1; colnum := (place - 1) mod side + 1; if box[rownum][colnum] then e('How many balls? '); readint(numballs); randomize; placed := 0; while placed < numballs do begin i := 1 + random(side); j := 1 + random(side); if not box[i][j] then begin box[i][j] := true; placed := placed + 1 end end end; (* * getray * sits in a loop getting numbers from the user, and using them to determine * where to fire a ray. if the number is 0, then the user is read to guess * where the balls are located.  end of the box *) function edge:boolean; begin case direction of left : edge := ( (place - 1) mod side ) = 0; right: edge := ( (place - 1) mod side ) = side - 1; up : edge := ( (place - 1) div side ) = 0; down : edge := ( (place - 1) div side ) = side - 1 end end; (* * diagup * tells me if there is a ball on the upward diagonal *) function diagup:boolean; begin case direction of left : diagup := box[rownum-1][colnum-1]; right:  if diagdown then begin case direction of left,right : direction := up; up,down : direction := left end; change(place); track := track(place) end else if not edge then begin change(place); track := track(place) end else track := place end end track := absorbed else begin if onside then begin case direction of left : direction := right; right: direction := left; up : direction := down; down : direction := up end; track := place end else begin if diagup and diagdown then begin case direction of left : direction := right; right: direction := left; *) procedure getray; var raynum : integer; outat : location; (* * raytobox * converts a user number into the equivalent location in the box *) procedure raytobox(var num : integer); begin if num <> 0 then begin if num <= side then begin direction := right; num := (num-1)*side + 1 end else if num <= (side + side) then begin direction := up; num := sqr(side) - ((2*side)-num) end diagup := box[rownum-1][colnum+1]; up : diagup := box[rownum-1][colnum-1]; down : diagup := box[rownum+1][colnum-1] end end; (* * diagdown * tells me if there is a ball on the diagonal downward *) function diagdown:boolean; begin case direction of left : diagdown := box[rownum+1][colnum-1]; right: diagdown := box[rownum+1][colnum+1]; up : diagdown := box[rownum-1][colnum+1]; down : diagdown := box[rownum+1][colnum+1] end end; (*  end end; (* * clearballs * removes all the balls from the box *) procedure clearballs; var i,j : 0..siden1; begin for i := 0 to siden1 do for j := 0 to siden1 do box[i][j] := false end; (* * placeballs * asks the user for the number of balls to place in the box, then * randomly places the balls in the box *) procedure placeballs; var i,j : 0..siden1; placed : integer; begin randomize; clearballs; writeln; writ   else if num <= (3 * side) then begin direction := left; num := (3 * side - num + 1) * side end else begin direction := down; num := (4 * side - num + 1) end end end; (* RayToBox *) (* * boxtoray * returns the ray location of an edge *) function boxtoray(place:location):location; begin case direction of right : boxtoray := place div side + 17; left : boxtoray := (place + (side-1)) dë!*{¯&ÍRÍòÍb*{¯&å!VÑÍNËEÊþ!*(¯&å!Ñ}2&¯Ã"*(¯&}2&¯*(¯&å!å*&¯&Ñë·íRÑÍ5z³Ê@"Õ}2'¯ÍR! ÍòÍb*'¯&#ÑÃ"*{¯&ÍRÍòÍ�Íb*(¯&#ÑË!É!å!ÍÑÙáÍÑÍÉ Í™å!ÑÍEz³Ê#Õ}2!¯*!¯&å!Ñë·íRå!ÑÍEz³Ê»"Õ}2 ¯ÍR! ÍòÍb* ¯&+ÑÚ"*{¯&ÍRÍòÍb!å*!¯&Ñë·íRå*!¯&ÑÍEz³Ê#Õ}2 ¯ÍR! ÍòÍb* ¯&+ÑÃá"*{¯&ÍRÍòÍ�Íb*!¯&+ÑÃz"É!å!å!ÍÑÙáÍÑÍÉ Í§ÑÍ5z³Ê¸#Õ}2¯*{¯&ÍRÍòÍb*¯&å!Ñë·íRå!å!ÑÍÞå!Ñë·íRÑÍ5z³Êœ#Õ}2¯ÍR! ÍòÍb*¯&#ÑÃ{#*{¯&ÍRÍòÍ�Íb*¯&#ÑÃ<#!å!ÍÑÙáÍÑÍÉ); for j := 1 to side do if box[i][j] then write('* ') else write('. '); writeln(')',25-i) end; writeln(' -------------------------'); writeln(' 9 10 11 12 13 14 15 16') end; begin clearballs; printballs; placeballs; getray; printballs; assign(dummy,'gamemenu.chn'); chain(dummy) end. Í Í Í Í Í ÍçÃá)J·íRÂ(Íà Íà Íà Íà Íà Íà ÍçÃá)K·íRÂ(Í#Ãá)L·íRÂ2(ÍÎ ÍÎ ÍÎ ÍÎ ÍÎ ÍÎ ÍçÃá)M·íRÂF(!åÍR$Ãá)N·íRÂV(Í&Ãá)O·íRÂx(ÍçÍ'!Í'!Í'!Í'!Í'!ÍçÃá)P·íRš(ÍçÍ'!Í'!ÍçÍÎ ÍÎ ÍÎ Ãá)Q·íR¼(ÍçÍ'!Í'!Í'!Í'!ÍçÍà Ãá)R·íRÂÞ(ÍçÍ'!Í'!ÍçÍ'!Í'!Í'!Ãá)S·íRÂ)ÍçÍÎ ÍÎ ÍçÍà Íà ÍçÃá)T·íRÂ")ÍçÍ Í Í Í Í Í Ãá)U·íRÂD)Í'!Í'!Í'!Í'!Í'!Í'!ÍçÃá)V·íRÂ`)Í'!Í'!Í'!Í'!Ín!Ãá)W·íRÂt)!åÍR$Ãá)X·íR‡)Ín!Í]"Ãá)Y·íR£)Ín!Í Í Í Í Ãá)Z·íR¹)ÍçÍe ÍçÃá)ÍRÍ�I don't kiv side; up : boxtoray := 33 - place; down : boxtoray := place - 48 end end; (* BoxToRay *) begin (* GetRay *) repeat write('Where should I shoot now? '); readint(raynum); while not (raynum in [0..maxstart]) do begin writeln('Sorry, but only numbers between 0 and ',maxstart); write('Start where? '); readint(raynum) end; if raynum <> 0 then begin write('in at ',raynum:2,' '); ou Í™å!ÑÍEz³ÊQ$Õ}2¯*{¯&ÍRÍòÍb*¯&å!Ñë·íRå!å!ÑÍÞå!Ñë·íRÑÍ5z³Ê5$Õ}2¯ÍR! ÍòÍb*¯&#ÑÃ$*{¯&ÍRÍòÍ�Íb*¯&+ÑÃÕ#Éýáá}2¯ýå*¯&ËEÊ„$!"¯!}2¯!å!ÑÍÞ}2¯Ã $!ÿÿ"¯!å!ÑÍÞ}2¯!}2¯Í'!*¯&å*¯&ÑÍaËEÊ&*{¯&ÍRÍòÍb!å*¯&ÑÍ5z³Êó$Õ}2¯ÍR! ÍòÍb*¯&#ÑÃÒ$*{¯&ÍRÍòÍb*¯&å!å!ÑÍÞÑÍaËEʰ%*¯&å*¯&Ñå!Ñå!Ñë·íRÍJ}2¯*¯&å!ÑÍ›ËEÊq%ÍR! ÍòÍb*¯&å!Ñë·íR}2¯Ã>%*{¯&ÍRÍòÍb!å*¯&ÑÍ5z³Ê­%Õ}2¯ÍR! ÍòÍb*¯&#ÑÃŒ%ÃÞ%!å*¯&ÑÍ5z³ÊÞ%Õ}2¯ÍR1!€¯¸ÿÍ�!‰*¯ͲÃâ)!å!ÑÍ5z³Ê Õ}2F¯*{¯&ÍRÍòÍb*F¯&#ÑÃòÍRÍ�ÍbÉ!å!å!ÑÍÞÑÍ5z³ÊS Õ}2A¯ÍR! ÍòÍb*A¯&#ÑÃ2 *{¯&ÍRÍòÍ�ÍbÉ!å!ÑÍ5z³ÊÍ Õ}2<¯!å!å*<¯&Ñë·íRÑÍ5z³Ê± Õ}2;¯ÍR! ÍòÍb*;¯&#ÑÃ� *{¯&ÍRÍòÍ�Íb*<¯&#ÑÃp É*{¯&ÍRÍòÍ�ÍbÉ!å!å!Ñë·íRÑÍ5z³Ê!Õ}22¯ÍR! ÍòÍb*2¯&#ÑÃô *{¯&ÍRÍòÍ�ÍbÉ*{¯&ÍRÍòÍb!å!å!Ñë·íRÑÍ5z³Êj!Õ}2-¯ÍR! ÍòÍb*-¯&#ÑÃI!ÍÎ É!å!å!ÍÑÙáÍÑÍÉ Í™ÑÍ5z³Ê\"Õ}2(¯!å*(¯&å!Ñë·íRÑÍ5z³ÊÌ!Õ}2'¯ÍR! ÍòÍb*'¯&#Ñnow that characterÍ�ÍbÉÍRÍ�Íb*{¯&å! ÑÍaËEÊf*ÍRÍ�)Input a character to enlarge (cr to end) Í�Íb!»Í8!{¯ÍÛÍb*{¯&Í(}2{¯ÍRÍ�ÍbÍŸ&ÍRÍ�ÍbÃë)!K¯åÍ gamemenu.chnÍ=!K¯Í´ÍbÃÅ a character to enlarge (cr to end) Í�Íb!»Í8!{¯ÍÛÍb*{¯&Í(tat := 0; raytobox(raynum); outat := track(raynum); if outat = 0 then writeln('Absorbed') else writeln('It came out at ',boxtoray(outat)) end until raynum = 0 end; (* GetRay *) (* * printballs * prints out the balls *) procedure printballs; var i,j : 1..side; begin writeln(' 32 31 30 29 28 27 26 25'); writeln(' -------------------------'); for i := 1 to side do begin write(i:2,'('! ÍòÍb*¯&#Ñý%*{¯&ÍRÍòÍ�Íb*¯&å*¯Ñ}2¯Ã£$Í'!É!å!ÑÍ5z³Êž&Õ}2 ¯*{¯&ÍRÍòÍb!å!å!Ñë·íRÑÍ5z³Ê‚&Õ}2 ¯* ¯&å* ¯&ÑÍNËEÊk&*{¯&ÍRÍòÍbÃw&ÍR! ÍòÍb* ¯&#ÑÃ<&*{¯&ÍRÍòÍ�Íb* ¯&#ÑÃ&ÉÍRÍ�Íb*{¯&A·íRÂÎ&ÍçÍ'!Í'!ÍçÍ'!Í'!Í'!Ãá)B·íRÂð&ÍçÍ'!Í'!ÍçÍ'!Í'!ÍçÃá)C·íRÂ'ÍçÍÎ ÍÎ ÍÎ ÍÎ ÍÎ ÍçÃá)D·íRÂ4'ÍçÍ'!Í'!Í'!Í'!Í'!ÍçÃá)E·íRÂV'ÍçÍÎ ÍÎ ÍçÍÎ ÍÎ ÍçÃá)F·íRÂx'ÍçÍÎ ÍÎ ÍçÍÎ ÍÎ ÍÎ Ãá)G·íRš'ÍçÍÎ ÍÎ Í'!Í'!Í'!ÍçÃá)H·íR¼'Í'!Í'!Í'!ÍçÍ'!Í'!Í'!Ãá)I·íRÂÞ'Íç  (* * block * print out block letters *) program block(input,output); const length = 6; (* length of a letter *) length1 = 7; var ch : char; (* character to enlarge *) dummy : file; (* * line * draw a line *) procedure line; var index : 1..length; begin for index := 1 to length do write(ch); writeln end; (* line *) (* * midline * print out a line half way across * the screen *) procedure midline; for i := round(length/2) downto 1 do begin write(ch); for j := i-1 to (length div 2) -1 do write(' '); writeln(ch) end end; (* drawk *) (* * drawmw * draw an m or w *) procedure drawmw(ism : boolean); var i,j : 0..length; stop : 0..length; by : -1..1; begin if ism then begin by := 1; i := 1; stop := length div 2 end else begin by := -1; i := length div 2; stop := 0 end 0..length1; begin for i := 1 to round(length/2) do begin for j := 1 to i-1 do write(' '); write(ch); if (ch='V') then d := i + 1 else d := i; for j := i to length - d do write(' '); writeln(ch) end end; (* topv *) (* * botv * draw an upside down v, on the * bottom of the screen (used in x) *) procedure botv; var i,j : 0..length; begin for i := round(length/2) downto 1 do begin for j := i-1ln; case ch of 'A' : begin line; twoside; twoside; line; twoside; twoside; twoside end; 'B' : begin line; twoside; twoside; line; twoside; twoside; line end; 'C' : begin  var i : 1..length; begin for i := 1 to length div 2 do write(' '); writeln(ch) end; (* midline *) (* * backdiag * draw a backward diagonal *) procedure backdiag; var j,i : 0..length; begin for j := 1 to length do begin for i := 1 to length -j do write(' '); writeln(ch) end end; (* backdiag *) (* * side * draw a single side *) procedure side; begin writeln(ch) end; (* side *) (* * farside * draw; twoside; while i<>stop do begin write(ch); for j := 2 to i do write(' '); write(ch); if i<>(length div 2) then begin j := abs(i + i + 2 - length); while j>0 do begin write(' '); j := j - 1 end; write(ch); for j := 2 to i do write(' '); end else for j := 3 to i do write(' ');; writeln(ch); i := i + by  downto 1 do write(' '); write(ch); for j := length - i downto i do write(' '); writeln(ch) end; end; (* botv *) (* * what follows here are the special case * letters. They must be drawn by themselves. *) (* * drawk * draw a k *) procedure drawk; var i,j : 0..length; begin for i := 1 to trunc(length / 2) do begin write(ch); for j := i-1 to (length div 2) -1 do write(' '); writeln(ch) end;  line; side; side; side; side; side; line end; 'D' : begin line; twoside; twoside; twoside; twoside; twoside; line end; 'E' : begin line; side; s a line on the far side *) procedure farside; var i : 1..length; begin for i := 1 to length -1 do write(' '); writeln(ch) end; (* farside *) (* * twoside * draw a '* *' *) procedure twoside; var index : 1..length; begin write(ch); for index := 2 to length -1 do write(' '); side end; (* twoside *) (* * topv * draw a V on the top of the letter * used for x, y and v *) procedure topv; var i,j : 0..length; d : end; twoside; end; (* drawmw *) (* * drawn * draw an n *) procedure drawn; var i,j : 0..length; begin for i := 1 to length do begin write(ch); for j := 2 to length -1 do begin if j = i then write(ch) else write(' ') end; writeln(ch) end end; (* drawn *) (* * draw * case statement which calls the * needed routines for each character *) procedure draw; begin write  ide; line; side; side; line end; 'F' : begin line; side; side; line; side; side; side end; 'G' : begin line; side; side; twoside; twoside;  side; line; farside; farside; line end; 'T' : begin line; midline; midline; midline; midline; midline; midline end; 'U' : begin twoside; twoside; twoside; twosidue); 'N' : drawn; 'O' : begin line; twoside; twoside; twoside; twoside; twoside; line end; 'P' : begin line; twoside; twoside; line; side; side; side end; 'Q' : begin  writeln end; assign(dummy,'gamemenu.chn'); chain(dummy) end. (* block *)  twoside; line end; 'H' : begin twoside; twoside; twoside; line; twoside; twoside; twoside end; 'I' : begin line; midline; midline; midline; midline; midline; line e; twoside; twoside; line end; 'V' : begin twoside; twoside; twoside; twoside; topv end; 'W' : drawmw(false); 'X' : begin topv; botv end; 'Y' : begin topv; midline; midline;  line; twoside; twoside; twoside; twoside; line; farside end; 'R' : begin line; twoside; twoside; line; twoside; twoside; twoside end; 'S' : begin line; side;  end; 'J' : begin farside; farside; farside; farside; farside; farside; line end; 'K' : drawk; 'L' : begin side; side; side; side; side; side; line; end; 'M' : drawmw(tr midline; midline end; 'Z' : begin line; backdiag; line end; else writeln('I don''t know that character'); end; end; (* draw *) (* main program *) begin writeln; while ch <> ^m do begin writeln('Input a character to enlarge (cr to end) '); read(trm,ch); ch := upcase(ch); writeln; draw;   1!€¯¸ÿÍ�!.&-¯ͲÞ$!å!ÑÍ5z³Ê# Õ}2>¯!w¯å*>¯&+Ñå!0å! ÍÑëás*>¯&#ÑÃòÉ!}2u¯!}2v¯ÍRÍ� Your guess? Íb!5¯Í+Í.Í_Íb!5¯Í Ímå!ÑÍN}24¯!}23¯*4¯&å*3¯&å!Ñ͇Ñ}£oËEÊÆ !5¯å*3¯&Ñn&åÍQ!0å!9ÍkÍ}24¯*3¯&å!Ñ}23¯Ãu *4¯&}îoËEÊÿ ÍRÍ�Illegal input, try againÍ�ÍbÍ$ ÃX"ÍQ!1¯Íâ!å!ÑÍ5z³Ê�!Õ}23¯!w¯å*3¯&+Ñn&å!5¯å*3¯&Ñn&ÑÍNËEÊv!!1¯Í-ÍQ*3¯&ÍaÍå!1¯Íâ*u¯&å!Ñ}2u¯*3¯&#ÑÃ!!å!ÑÍ5z³ÊX"Õ}23¯!}22¯*2¯&å!Ñ͇ËEÊM"!5¯å*3¯&Ñn&å!w¯å*2¯&+Ñ*) procedure create; var i : 1..numdigits; (* index variable *) begin for i := 1 to numdigits do number[i] := chr(ord('0') + random(10)) end; (* create *) (* * play * gets a number from the player * then figures out how many white, * and black numbers he (she) has. *) procedure play; const indexlength = 5; (* length of the indices *) var user : string[4]; (* input from player *) notbad : boolean; (* used to test foare to try again? Íb!»Í8!{¯ÍÛÍbÍRÍ�Íb*{¯&Í(å!YÑÍaËEÊò$!C¯åÍ gamemenu.chnÍ=!C¯Í´ÍbÃÅses.Í�ÍbÍRÍ�ÍbÍRÍ�C used := used + [j]; j := numdigits end; j := j + 1 end (* while *) end (* for *) end (* else notbad *) end; (* play *) (* * inst * print out the instructions *) procedure inst; begin writeln('Boggle'); writeln; writeln('A version of mastermind.'); writeln('I guess a number, then you attempt to'); writeln('find out what the number is. When'); writeln('you make a guess, I will tell you hn&ÑÍNå*3¯&å*2¯&ÑÍaÑ}£oå*2¯&å!1¯Í-Í}îoÑ}£oËEÊ;"*v¯&å!Ñ}2v¯!1¯Í-ÍQ*2¯&ÍaÍå!1¯Íâ!}22¯*2¯&å!Ñ}22¯Ã�!*3¯&#ÑÃŒ!ÉÍRÍ�BoggleÍ�ÍbÍRÍ�ÍbÍRÍ�A version of mastermind.Í�ÍbÍRÍ�%I guess a number, then you attempt toÍ�ÍbÍRÍ�!find out what the number is. WhenÍ�ÍbÍRÍ�%you make a guess, I will tell you howÍ�ÍbÍRÍ�%many digits were correct and in theirÍ�ÍbÍRÍ�#correct location (White numbers). IÍ�ÍbÍRÍ�'will also tell you how many digits wereÍ�ÍbÍRÍ� r garbage *) i,j : 1..indexlength; (* index variables *) used : set of 1..numdigits; (* whether the digit has been used *) begin numwhite := 0; numblack := 0; write('Your guess? '); readln(user); notbad := length(user) = numdigits; i := 1; while notbad and (i <= numdigits) do begin notbad := user[i] in ['0'..'9']; i := i + 1 end; if not notbad then begin writeln('Illegal input, try again'); play end program boggle(input,output); const numdigits = 4; (* the number of digits in the number *) var ch : char; (* used to answer questions *) number : array[1..numdigits] of char; (* the actual number *) numblack, (* number of correct digits *) numwhite: 0..numdigits; (* number of correct and ordered digits *) numguess: integer; (* number of guesses taken *) dummy : file; (* * create * create a random number ow'); writeln('many digits were correct and in their'); writeln('correct location (White numbers). I'); writeln('will also tell you how many digits were'); writeln('correct, but in the wrong place.'); writeln; writeln('For example, is the number is 1234, and'); writeln('you guess 1467, then you would have'); writeln('1 white (the 1) and 1 black number (the 4),'); writeln end; (* inst *) begin write('Do you want instructions? '); read(trm,ch); writeln; correct, but in the wrong place.Í�ÍbÍRÍ�ÍbÍRÍ�'For example, is the number is 1234, andÍ�ÍbÍRÍ�#you guess 1467, then you would haveÍ�ÍbÍRÍ�+1 white (the 1) and 1 black number (the 4),Í�ÍbÍRÍ�ÍbÉÍRÍ�Do you want instructions? Íb!»Í8!{¯ÍÛÍbÍRÍ�Íb*{¯&Í(å!YÑÍNËEÊò$ÍY"ÍíÍç!}2u¯!}2v¯!"s¯*u¯&å!ÑÍaËEÊk%Í$ ÍRÍ�White = *u¯&å!ÍöÍ� Black = *v¯&å!ÍöÍ�Íb*s¯å!Ñ"s¯Ã %ÍRÍ�ÍbÍRÍ�CorrectÍ�ÍbÍRÍ� It took you *s¯å!ÍöÍ� guesses.Í�ÍbÍRÍ�ÍbÍRÍ�C else (* notbad *) begin used := []; for i := 1 to numdigits do if number[i] = user[i] then begin used := used + [i]; numwhite := numwhite + 1 end; for i := 1 to numdigits do begin j := 1; while j <= numdigits do begin if (user[i] = number [j]) and (i<>j) and not (j in used) then begin numblack := numblack + 1;    if upcase(ch)='Y' then inst; repeat randomize; create; numwhite := 0; numblack := 0; numguess := 0; while numwhite <> numdigits do begin play; writeln('White = ',numwhite,' Black = ',numblack); numguess := numguess + 1 end; writeln; writeln('Correct'); writeln('It took you ',numguess,' guesses.'); writeln; write('Care to try again? '); read(trm,ch); writeln;ËEÊ5"ÍRÍ�only numbers between *Ì®å!ÍöÍ� and *Ê®å!ÍöÍ� are allowed.Í�Íb!Î®Í *Ì®å*Ê®åÍ�!"¯Ã;"*Ä®"¯*¯ÉÍí!å!ÍÑ}2½®*½®&ÍRå!ÍöÍ� Íb*½®&"®*®É!è"z¯ÍRÍ�Want instructions? Íb!»Í8!v¯ÍÛÍbÍRÍ�Íb*v¯&Í(å!YÑÍNËEÊÉ"Íg ÍRÍ�ÍbÍRÍ� You have $*z¯å!ÍöÍ�ÍbÍHow large a bet? !å*z¯åÍ�!"x¯ÍPick a number !å!åÍ�!}2w¯!}2t¯ÍRÍ�Die1 Die2 Die3Í�Íb!å!ÑÍ5z³Êœ#Õ}2u¯Í?"å*w¯&ÑÍNËEÊ‘#*t¯&å!Ñ}2t¯*u¯&#ÑÃf#ÍRÍ�Íb*t¯&å!ÑÍNËEÊö#ÍRÍ� You won $*xie; (* number of matched dice *) dummy : file; {$I readnum } (* * inst * prints out instructions *) procedure inst; begin writeln('Chuck-a-luck'); writeln; writeln('You choose a number between 1 and 6.'); writeln('I roll three dice, if you match 1, you'); writeln('get even money. If you match 2 dice,'); writeln('you get double your bet, if you match all'); writeln('three, you get triple.'); writeln end; (* inst *) (* * getnum * ask a ques until upcase(ch) <> 'Y'; assign(dummy,'gamemenu.chn'); chain(dummy) end. (* boggle *) (* * chuckaluck * you choose a number between 1 and 6. * I roll three dice, if you match 1, you * get even money. If you match 2 dice, * you get double, if you match all three, * you get triple. *) program chuckaluck(input,output); const startmoney = 1000; (* amount of money you start with *) maxdie = 6; (* maximum value of a die *) mindie = 1; (* minimum value of a die *) numdie = 3; (* number of dice *) payoff¯å!ÑÍÄå!ÍöÍ�Íb*z¯å*x¯å!ÑÍÄÑ"z¯ÃÈ$*t¯&å!ÑÍNËEÊG$ÍRÍ� you won $*x¯å!ÑÍÄå!ÍöÍ�Íb*z¯å*x¯å!ÑÍÄÑ"z¯ÃÈ$*t¯&å!ÑÍNËEʘ$ÍRÍ� You won $*x¯å!ÑÍÄå!ÍöÍ�Íb*z¯å*x¯å!ÑÍÄÑ"z¯ÃÈ$ÍRÍ� You lost $*x¯å!ÍöÍ�Íb*z¯å*x¯Ñë·íR"z¯*z¯å!ÑÍ›ËEÊ%ÍRÍ�Care to try your luck again? Íb!»Í8!v¯ÍÛÍbÍRÍ�Íb*z¯å!Ñ͇å*v¯&Í(å!YÑÍaÑ}³oËEÊÉ"ÍRÍ�You leave with $*z¯å!ÍöÍ�Íb!D¯åÍ gamemenu.chnÍ=!D¯Í´ÍbÃÅv¯ÍÛÍbÍRÍ�Íb*z¯å!Ñ͇å*v¯&Í(å!YÑÍaÑ}³oËEÊÉ"ÍRÍ�You letion from the player, * and get a number between min and * max with error checking *) function getnum(question:str80;min,max:integer):integer; var inter : integer; (* intermediate result *) begin write(question); readint(inter); if (inter < min) or (inter > max) then begin writeln('only numbers between ',min,' and ',max,' are allowed.'); getnum := getnum(question,min,max) end else getnum := inter end; (* getnum *) (* * rolldie *1!€¯¸ÿÍ�!†%½®ͲÃv"ýáá"B¯ýå*B¯^#Vë"'¯!)¯Í+Í.Í_Íb!)¯Í *B¯å!%¯Íž*%¯å!ÑÍaËEÊV ÍRÍ�Please enter a numberÍ�Íb*'¯ë*B¯s#r*%¯å!ÑÍNËEÊïÉÍRÍ� Chuck-a-luckÍ�ÍbÍRÍ�ÍbÍRÍ�$You choose a number between 1 and 6.Í�ÍbÍRÍ�&I roll three dice, if you match 1, youÍ�ÍbÍRÍ�$get even money. If you match 2 dice,Í�ÍbÍRÍ�)you get double your bet, if you match allÍ�ÍbÍRÍ�three, you get triple.Í�ÍbÍRÍ�ÍbÉýáá"Ê®á"Ì®P!ήͲýå!Î®Í ÍR!ÍqÍb!Ä®åÍç*Ä®å*Ì®Ñͯå*Ä®å*Ê®ÑÍ›Ñ}³o1 = 1; (* pay off even money on 1 match *) payoff2 = 2; (* pay off double on two *) payoff3 = 3; (* pay off triple on three *) type str80 = string[80]; var money : integer; (* the amount of money you have *) bet : integer; (* amount you bet *) guess : mindie..maxdie; (* the die you guess *) ch : char; (* used for input *) eachdie: 1..numdie; (* index used to roll die *) matched: 0..numd   roll a die and print out its * value. *) function rolldie: integer; var dievalue : mindie..maxdie; begin randomize; dievalue := mindie + random(maxdie); write(dievalue:4,' '); rolldie := dievalue end; (* rolldie *) begin money := startmoney; write('Want instructions? '); read(trm,ch); writeln; if upcase(ch) = 'Y' then inst; repeat writeln; writeln('You have $',money); bet := getnum('How large a bet? ',1,money); th file - !× ~·ÊÍT #ÃÍM ÍM ¯2­ 2® 2¯ 2° É!× >2Õ åÍ3áþÂo:Õ ·Â�:¸ ·ÊÍ@ ***No CRC Files found***$>·Éæþ ʉþ ʉw#:Õ <2Õ þPÚ6:Õ ·Ê.6¯ÉÍ@ Can not parse string !× ~·Ê½ÍT #ñÍM !× ÊÕ> ¾ÊÐ6 #ÂÈ6^#6!× ~·ÊéÍT #ÃÝ!¯ 4ÍM ɾÀ#x¹ÈÃñå]Í #eÍ ¯wá~·Ê ÍT #Ã>2· Í@ - Ís ÒMÍ@ File not found !° 4à >2Ò ÍoÀ:µ G:² ¸Â„:´ G:³ ¸Â„Í@ *Match* ¯2¸ !­ 4¯ÉÍ@ <-- is, was --> :´ Í) > ÍT :µ Í) ÍM ¯2¸ !® 4¯<ÉÍÀ2´ ~#þ ÊëÍ@ Not a space between CRC values¯<ÉÍÀ2µ G¯É-CATALOG???mmy,'gamemenu.chn'); chain(dummy) end. (* chuckaluck *) RROR++ ¯<É*² |æ€õ):¶ …oñÊ% |î g}î—o"² ÉõÍ2 ñæþ Ú; ÆÆ0ÃT ã~ÍT #~·ÂA ãÉ> ÍT > ÅÕåæ_ÕÍh ÑÍáÑÁÉ:± þFÀ{͇ɀͯ2h2|:· ·Ê² !\º  Í :\2Æ !º \ Í \ÍÃÚ !Æ \ Í \Í!º \ Í \Í<7È=懇‡‡‡Æ�o&åÇ  Í á] Í ¯2h2|2· ÉÍ ÀÍ À~æþ$#É~# x±Â ÉÑ Í:± þFÂ} *‚}æÂ= "€>õ͇ñÂ1 ]Í<Âu  ^ ÍÃu CANNOT CLOSE CRCFILE$]ÍÍ� ++ABORTED++$Ñ Í:Ò ·Ê~ ¯2± ÍM Í@ Quantity of file CRC that matched - :­ ̓ :® ·Ê ÍM Í@ Quantity of file CRC that did not guess := getnum('Pick a number ',mindie,maxdie); matched := 0; writeln('Die1 Die2 Die3'); for eachdie := 1 to numdie do if rolldie = guess then matched := matched + 1; writeln; if matched = 1 then begin writeln('You won $',bet*payoff1); money := money + bet*payoff1 end else if matched = 2 then begin writeln('you won $',bet*payoff2); money := money + bet*payoffÍ@ ++ Now searching for "-CATALOG" file++ !õ Í ÍÂ) Í.Â) !× Íå”>.¾Â”#Íô”Í͔͡”ÍÍ›Íø›ÍøÊtþK›ÍÍ›͸›*« ÍýÃ=:¸ ·Â=Í”Ã="« Í ÀÍ ʳþ À ª~#þ.ÀÍ ÊÈþ À ¿É~þ ÊÖþ À#~þ ÊÖþ ÊÖ¿ÉÍôÀÍøÈþ.À+¿ÉÍøÀ~#þ0Úþ:Ò¿Éþ0É~#þ!ÚþÒ¿ÉþAÉÍ.ÀOÍ.ÀGy°¿É~#þ0ÚMÖ0þ ÚKæÖþ ÚMþÒM¿É·É:m2± þFÂSÄCRCKLIST$$$›Íø›ÍøÊtþK›‰, ݈ õ*€ë*‚}“|šÚù!"‚ë*€{•zœÒë*~ëÍ]Í·ÂÊ€*‚"‚Ü ÖÍñÃî DISK FULL: CRCFILE$€Í!"‚ë*~ëñÃ#CRC.COM 5.0 6/18/82CRCKFILE???!9"‡ 1‡ ÍM Í@ CRC Ver 5.0 CTL-S pauses, CTL-C aborts :]þ ÂOÍ@ ++Searching for CRCKLIST file++ÍÊÇÍ@ Now searching for "CRCKFILE" file++ ! Í ÍÂ1‡ Í.Â) F!×  ÍñÂÍ¡Â]ÍñÂ͸Â!â ÍýÃÇÍ”ÃÇÃ0CRCKLIST???CRCKFILE???!9"‡ ‰ M à*,ë*.}“|šÚ‰!".ë*,{•zœÒ{**ëÍ Í·Âu€*.".ÃG*.",€Í!".ë**ë*,}´>È*.#".ɯ22)! ",". Í<ÂÙ ÇÍÃî NO FILECRC FILE$! × Í >.Í ¯Í@ Checking wi match - :® ̓ :¯ ·ÊJ ÍM Í@ Quantity of lines failed parse test - :¯ ̓ :° ·Ê~ ÍM Í@ Quantity of file(s) not found - :° ̓ *‡ ùÉdÍ”  Í” Æ0ÃT ÿ �Ò– €Wy³Ê© ö0ÍT 0zÉtiil2 end else if matched = 3 then begin writeln('You won $',bet*payoff3); money := money + bet*payoff3 end else begin writeln('You lost $',bet); money := money - bet end; if money > 0 then begin write('Care to try your luck again? '); read(trm,ch); writeln; end until (money <= 0) or (upcase(ch) <> 'Y'); writeln('You leave with $',money); assign(du*‚#"‚ɯ2i2}! "€!"‚]Í]Í<ÂS ;ÍÃî NO DIR SPACE: CRCFILE$1‡ >2Ò Ís Ò :· ·Ê~Í# ++FILE NOT FOUND++$:± þFÂ*‚}æÂ’"€>õ͇ñ†]Í<ÂÊ ³ÍÃÊ CANNOT CLOSE CRCFILE$ÃîCRCKLISTCRCSK FULL: CRCFILE$€ÍÍà å w# ÂþÑÍÉ!]ÍÍùÍ� DONE$!eÍ ÊS!]QÍ !eZÍ Í@ --> FILE: XXXXXXXX.XXX CRC = ÍoÊSÃ) \Í<‘Í@ ++OPEN FAILED++à !"² !"Ó *Ó |þÊÈ Í·Ê¹ÍþÊ) \Í·ÂÖ!€~2¶ #"Ó Í Ã�þÂî:³ Í) > ÍT :² Í) ¯ÉÍ@ ++FILE READ E   --> FILE: GAMES .COM CRC = A0 8E --> FILE: KENO .CHN CRC = E9 4B --> FILE: BJGAME .CHN CRC = E3 E0 --> FILE: BACCARAT.CHN CRC = B7 8A --> FILE: BLACKBOX.CHN CRC = 62 70 --> FILE: CRC .COM CRC = B2 07 --> FILE: WORDS .DAT CRC = E3 66 --> FILE: BLOCK .CHN CRC = A1 46 --> FILE: BOGGLE .CHN CRC = 6A FF --> FILE: CHUCKLCK.CHN CRC = BD 8A --> FILE: DODGE .CHN CRC = 3B F2 --> FILE: GUESSIT .CHN CRC = 2F 7F --> FILE: HANGMAN .CHN CRC = 21 AD --> FILE: HORSEC 4Ø:Ò!4Ã:Ò!5É( Í µÖŸ! ¦ÒI3Í= ÿÍ: [Í= ÉÍt:\þÊa:\=_Í: :]þ Ât Å?]Í\ : Òƒ! 6?ÃŽÿ Í: 2  Å ]ÍQ  Å?\Í\ ÅÍ: DM, ÍQ !Ñ "= *3 ##)ë*= "; */ &#Íì "! *3 #"#  !! Íò "% >ÿ!1 Í. Ÿ2' É\Í: 2 : þÿÊ©: 懇‡‡‡Æ€o&"* ~þåÊ›*# +"# ** DMÍY Ò›** DMÍ  å*; Áq#p* " . å** #DM*; ëá -Âe**  å*; Ñw* #" )ë*= å*; ëás#r*; "; Í: 2 ÃÉ!S 6!"V * "n >!S ¾Òd*S &T ) ^#Vë"K O!l ^#Vë"M :S =2S M K Í Òa*K "G **( ÍÔ ë*‘ "‘ Í Ã3É*1 #"ž "  "¢ *5 "œ >œ Í# µÊR :œ ÒB *ž +"ž !œ Íò ë+s#rÃ( !¤ 6Í: "š *š ~2¥ *¢ #"˜ *˜ +"˜ >Í µÊ¶ :¥ 2¥ Ò’ *  +"  :¤ <2¤ O>¹Ò³ !¤ 6*š #"š *š ~2¥ Ãp ̓Í: ÆAOÍK �Í= *ž Ͱ�Í= * Í·›Í= * Ͱ�Í= *# Í·›Í= *  Ͱ¬Í= ÉÉ. æg æ”ÂS -ÂA É>ÿØ>É!  ~þ?Êl W æº>À#Â^ :·À /æÉ!:' ·Â—  ·Ê‘ #‹ É W ²Ê¢ #™ Éi`N#F�oˆgÉDM!>õ)ë—)ë�‘o|˜gÒÎ ñ=¼ ÉDM!>)ë)ëÒã =ÂÛ É^#Vë) Âì É^#Vë|·g}o ÂöRAC.CHN CRC = FA 48 --> FILE: BACCARAT.PAS CRC = AB 86 --> FILE: GAMEMENU.CHN CRC = 47 11 --> FILE: 29-DISK .DOC CRC = 3C 0A --> FILE: BLACKBOX.PAS CRC = 77 8C --> FILE: BOGGLE .PAS CRC = D8 E4 --> FILE: CHUCKLCK.PAS CRC = 76 FC --> FILE: DODGE .PAS CRC = 30 EE --> FILE: MAKEFILE.CHN CRC = C0 0B --> FILE: MAKEFILE.PAS CRC = 61 83 --> FILE: GUESSIT .PAS CRC = CB 35 --> FILE: GAMES .PAS CRC = E2 89 --> FILE: HANGMAN .PAS CRC = 70 3A --> FILE: BJGAME .PAS CRC = 51 M "I ë*K Íö )ë*= ^#Vë"O I G Í ÚÇ*G )ë*= N#F*O ëÍ? þÿÂJ*G #"G Ã(*I )ë*= ^#V*O DMÍ? þÿÂm*I +"I ÃJI G Í ÚÄ*G )ë*= ^#Vë"Q *I )ë*= å*G )ë*= ãN#Fáq#p*I )ë*= å*Q ëás#r*G #"G *I +"I ÃK I Í G M åÍ ÑÍ Ò!M G Í Ò:S <2S O!T å*G ëás#r*S &l ) å*M ëás#r*I "M Ã^I K Í ÒX:S <2S O!T å*K ëás#r*S &l ) å*I ëás#r*G "K ÃíûÉ!"„ "†  † Í Ò#*† #"† )ë*= å*„ #"„ )ë*= ãN#Fáq#p † Í Ÿõ*„ )ë*= å*† ) ë*= ^#VáN#FÍ? ÖÖŸÁH¡Ò *† #"† )ë*= ^#Vë";  *; ^#Vë"ˆ *„ )ë*= Ãÿ Hit Space: ÍKÃK : k Used: /k Not used: k ë*% ÍÔ DMÃf : remain on 1 !9" !Ñ ùÍJÍú> Í# µÊ->! Í. Ò*ͪÍe> Í# µÊ<Í×Í * ùÉv ÍK É ÍK  ÍK É!B r+s+p+qA ? Í Úp*A É*? É:]þ$ÂŽ Ål]ÍQ !]6 !E 6!C 6 :C Í Ú*C &l ~2D þU¼:E 2 :D þSÂÊ:E 2:D þFÂØ:E 2:D þVÂæ:E 2:D þPÂô:E 2 :D ÖNÆÿŸ2E ! É_{•ozœgÉO{‘oz˜gÉi`N#F‘o˜gÉo&•oœgÉ_{–_z#žWëÉà þÈÅOÍK ÁÃ= YÃáã -ÂS Éáã{-Â_ É!¨ s+p+q*¦ å« ͼ 2ª <2© :¨ !© ¾Ú—  ÍK !© 4Ã� !© 6:ª =!© ¾Ú» *© &« NÍK !© 4œ Éáã>õ3ÊÕ Íá Æ0õ3}´ÂÄ Z;ñÂ× {ÉÅ ¯)¹Úî ‘#Âæ ÁÉÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ65 --> FILE: HORSERAC.PAS CRC = 7D FA --> FILE: KENO .PAS CRC = 52 8C --> FILE: GAMEMENU.PAS CRC = F8 C2 --> FILE: BLOCK .PAS CRC = 57 28 --> FILE: READNUM .PAS CRC = 30 1B --> FILE: D .COM CRC = 66 48^#Vë"; *; ˆ ͪ  å*; Áq#pÃ�Ãn*„ " É!‹ p+q*Š )ë*= ^#Vë"; !Œ 6> !Œ ¾Úi*Œ &ë*; >¦OÍK :Œ <2Œ ÂE:/ÒÖ *; ^#V*% ÍÔ DMÍf kÍK :ÒÖ *; NÍf ÍE*; ~þ€Ú»WÍK þÍE *; ~þ€ÚÓSÍK ÃÖÍEÉ Í= !— 6:!— ¾Ú':/Ò :Ò –Í= !:— ¾Ò‰Í= :— <2— Ââ* "• !"‘ >!• Í. Ò *• ë*&͵ ë"( *• ë*&͵ >Í µÊj*( #"( *DM*( ëÍV"( !"� ( � Í ÒúÍK!"� }2— :— <2— O:¹Úð*� ë*� å*‘ Á "“  “ Í Úâ>!— ¾ÒÓÀÍ= *“ DMÍ**• +"• *( ë*� "� Ø*� #"� Ã*&ë  1!€¯¸ÿÍ�!M4,­Ͳþ2!}2§­!å!ÑÍ5z³ÊM Õ"l­!å!ÑÍ5z³ÊD Õ"j­!º­å*l­+)å)å)å)ÑÑÑÑå*j­+Ñå!ëás*j­#Ñà *l­#ÑÃù!}2¨­!å!ÑÍ5z³Ê» Õ"l­!º­å!+)å)å)å)ÑÑÑÑå*l­+Ñå!ëás!º­å!+)å)å)å)ÑÑÑÑå*l­+Ñå!ëás*l­#ÑÃ_ !å!ÑÍ5z³Ê"!Õ"l­!º­å*l­+)å)å)å)ÑÑÑÑå!+Ñå!ëás!º­å*l­+)å)å)å)ÑÑÑÑå!+Ñå!ëás*l­#ÑÃÆ !"p­*p­å!ÑͯËEÊÂ!!å!ÍÑ}2o­!å!ÍÑ}2n­!º­å*n­&+)å)å)å)ÑÑÑÑå*o­&+Ñn&å!ÑÍNËEÊ¿!!º­å*n­&+)å)å)å)ÑÑÑÑå*o­&+Ñå!ëás*p­å!Ñ"p­Ã(!!"p­*Í�#The tank just destroyed an attackerÍ�Íb!ª­å*7­+)Ñå!ëás*¨­&å!Ñë·íR}2¨­ÃŸ,·íRÂN*ÍRÍ�You just died!!!Í�Íb!}2¶­ÃŸ,·íRÂH,!å!ÑÍ5z³Êë*Õ}20­!ª­å*7­+)Ñn&å!ª­å*0­&+)Ñn&ÑÍNå!ª­å*7­+)Ñn&å!ª­å*0­&+)Ñn&ÑÍNÑ}£oå*7­å*0­&ÑÍaÑ}£oËEÊà**0­&}21­*0­&#ÑÃc*ÍRÍ�Two attackers just collided!Í�Íb!º­å!ª­å*1­&+)Ñn&+)å)å)å)ÑÑÑÑå!ª­å*1­&+)Ñn&+Ñå!ëás!ª­å*7­+)Ñå!å!ÍÑëás!ª­å*7­+)Ñå!å!ÍÑëás*7­å!ª­å*7­+)Ñå!ª­å*7­+)Ñå!ª­å*7­+)ÑåÍ(åÍ¡$åÍ_)!å!Ñë·íRë*_­sÃ&·íRÂ&*a­n&å!Ñë*a­s*_­n&å!Ñë*_­s!º­å*_­n&+)å)å)å)ÑÑÑÑå*a­n&+Ñn&}2c­*c­&É!}2J­!0å!9ÑÍ5z³Ê€&Õ}2I­!K­å*I­&ÐÿÑå*J­&ëás*J­&#}2J­*I­&#ÑÃI&ÍRÍ� Direction? Íb!»Í8!I­ÍÛÍb*I­&åÍQ!0å!9ÍkÍ}îoå*I­&å!0ÑÍNå*§­&å!ÑÍNÑ}£oÑ}³oËEÊ 'ÍRÍ� How is that? Í�ÍbÍ7&}2Y­Ã5'!å!ÑÍ5z³Ê5'Õ"G­!å*G­Íͽ*G­#ÑÃ'!å!Í!º­å*·­&+)å)å)å)ÑÑÑÑå*¶­&+Ñå!ëás*I­&å!0ÑÍNËEʳ'*§­&å!Ñë·íR}2§­!å!ÍÑ}2·­!å!ÍÑ}2¶­!0}2I­!K­å*I­&ÐÿÑn&}2¦­ destroyed. If two attackers hit each other, they areÍ�ÍbÍRÍ�@ randomly put somewhere else. If an attacker hits the tank, thenÍ�ÍbÍRÍ�9 the attacker is destroyed. As an added bonus, there are !å!ÍöÍ�ÍbÍRÍ�? mines in the square (and the border of the square). If you hitÍ�ÍbÍRÍ�@ a mine, you are destroyed. If an attacker hits a mine, then theÍ�ÍbÍRÍ�@ attacker is destroyed. Your object is to destroy the attackers.Í�ÍbÍRÍ�ÍbÍRÍ� You can move by:Í�ÍbÍRÍ� 789Í�ÍbÍRÍ�p­å!Ñ͇ËEÊŽ"!å!ÍÑ}2o­!å!ÍÑ}2n­!º­å*n­&+)å)å)å)ÑÑÑÑå*o­&+Ñn&å!ÑÍNËEÊ‹"!º­å*n­&+)å)å)å)ÑÑÑÑå*o­&+Ñå!ëás!ª­å*p­+)Ñå*o­&ëás!ª­å*p­+)Ñå*n­&ëás*p­å!Ñ"p­ÃÈ!!º­å*n­&+)å)å)å)ÑÑÑÑå*o­&+Ñn&å!ÑÍaËEÊã"!å!ÍÑ}2o­!å!ÍÑ}2n­ÃŽ"!º­å*n­&+)å)å)å)ÑÑÑÑå*o­&+Ñå!ëás*o­&}2¸­*n­&}2¹­!º­å*n­&+)å)å)å)ÑÑÑÑå*o­&+Ñn&å!ÑÍaËEÊs#!å!ÍÑ}2o­!å!ÍÑ}2n­Ã#!º­å*n­&+)å)å)å)ÑÑÑÑå*o­&+Ñå!ëás*o­&}2¶­*n­&}2·­É!å!Í!å!ÑÍ5z³Ê $ª­å*1­&+)Ñå!å!ÍÑëás!ª­å*1­&+)Ñå!å!ÍÑëás*1­&å!ª­å*1­&+)Ñå!ª­å*1­&+)Ñå!ª­å*1­&+)ÑåÍ(åÍ¡$åÍ_)ß,·íRŸ,ÍRÍ�An attacker just hit a mine.Í�Íb!ª­å*7­+)Ñå!ëás*¨­&å!Ñë·íR}2¨­É!å!ÑÍ5z³Ê_-Õ}2B­!ª­å*B­&+)Ñn&å!ÑÍaËEÊT-!º­å!ª­å*B­&+)Ñn&+)å)å)å)ÑÑÑÑå!ª­å*B­&+)Ñn&+Ñå!ëás*B­&å!ª­å*B­&+)Ñå!ª­å*B­&+)Ñå!ª­å*B­&+)ÑåÍ(åÍ¡$åÍ_)*B­&#Ñë,!º­å*¹­&+)å)å)å)ÑÑÑÑå*¸­&+Ñå!ëás!¸­å!¹­å!¸­åÍ(åÍ¡$·íRÂ_.ÍRÍ�#The tank just destroyed an att!¶­å!·­å!K­å*I­&ÐÿÑn&åÍ¡$}2Y­!º­å*·­&+)å)å)å)ÑÑÑÑå*¶­&+Ñå!ëás*Y­&Éà,ýáá?­í°ýå!}2:­!}29­*¶­&å*?­&ÑÍ›ËEÊV(!}2:­Ãq(*¶­&å*?­&ÑͯËEÊq(!}2:­*·­&å*@­&ÑÍ›ËEÊ�(!}29­Ãª(*·­&å*@­&ÑͯËEʪ(!}29­*:­&å!ÑÍNå*9­&å!ÑÍNÑ}³oËEÊø(*:­&å!ÑÍNËEÊì(*9­&}2A­Ãõ(*:­&}2A­ÃY)*:­&·íRÂ,)*9­&å!ÑÍNËEÊ")!}2A­Ã))!}2A­ÃY)·íRÂY)*9­&å!ÑÍNËEÊR)! }2A­ÃY)!}2A­*A­&Éýáá}26­á"7­ýå*6­&·íR¼)!º­å!ª­å*7­+)Ñn&+)å)å)å)ÑÑÑÑå!ª­å*7­+)Ñn&+Ñå!ëásß,·íRÂ*ÍR 456Í�ÍbÍRÍ� 123Í�ÍbÍRÍ�= Note that a 5 leaves you in the same place. A move of 0 willÍ�ÍbÍRÍ�= put you in some random place on the square (even on a mine).Í�ÍbÍRÍ�ÍbÍRÍ�Hit any key to continueÍ�Íb!¾Í8!©­ÍÛÍbÉÍRÍ�Want instructions? Íb!»Í8!©­ÍÛÍbÍRÍ�Íb*©­&Í(å!YÑÍNËEÊ 3Í/ÍcÍíÍçͯ#*¶­&å!ÑÍaå*¨­&å!ÑÍ›Ñ}£oËEÊg3Í7&å!ÑÍaËEÊU3!}2¶­Ã[3Í(ͯ#ÍRÍ�ÍbÃ3*¶­&å!ÑÍNËEÊ©3ÍRÍ� Well, you got yourself killed!!!Í�ÍbÃÔ3ÍRÍ�Congratulations, you did Õ}2d­!å!ÑÍ5z³ÊŒ$Õ}2e­!º­å*d­&+)å)å)å)ÑÑÑÑå*e­&+Ñn&·íR $ÍR!*ÍòÍbÃ�$·íRÂ9$ÍR!TÍòÍbÃ�$·íRÂR$ÍR!$ÍòÍbÃ�$·íRÂk$ÍR!XÍòÍbÃ�$·íRÂ�$ÍR! ÍòÍb*e­&#ÑÃÙ#ÍRÍ�Íb*d­&#ÑÃÄ#Éýáá}2^­á"_­á"a­ýå*^­&·íRÂ×$*_­n&å!Ñë·íRë*_­sÃ&·íRÂä$Ã&·íRÂ%*_­n&å!Ñë*_­sÃ&·íRÂ#%*a­n&å!Ñë·íRë*a­sÃ&·íRÂA%*a­n&å!Ñë*a­sÃ&·íRÂv%*a­n&å!Ñë·íRë*a­s*_­n&å!Ñë·íRë*_­sÃ&·íR¨%*a­n&å!Ñë·íRë*a­s*_­n&å!Ñë*_­sÃ& ·íRÂÚ%*a­n&å!Ñë*a­s*_­n&ackerÍ�Íb*¨­&å!Ñë·íR}2¨­!å!ÑÍ5z³Ê\.Õ}2B­!ª­å*B­&+)Ñn&å*¸­&ÑÍNå!ª­å*B­&+)Ñn&å*¹­&ÑÍNÑ}£oËEÊQ.!ª­å*B­&+)Ñå!ëás*B­&#ÑÃñ-ÃÝ.·íR—.ÍRÍ�The tank just destroyed a mineÍ�ÍbÃÝ.·íRÂÓ.ÍRÍ�The tank just destroyed youÍ�Íb!}2¶­ÃÝ.·íRÂÝ.!º­å*¹­&+)å)å)å)ÑÑÑÑå*¸­&+Ñå!ëásÉÍRÍ� DodgeÍ�ÍbÍRÍ�( You are in a 30 x 15 square. There are !å!ÍöÍ� attackers,Í�ÍbÍRÍ�A one tank, and you. If you hit one of the attackers (or the tank)Í�ÍbÍRÍ�= you are  it!!!Í�ÍbÍRÍ�ÍbÍRÍ�Want to try again? Íbͽ!»Í8!©­ÍÛÍbÍRÍ�Íb*©­&Í(å!YÑÍaËEÊ 3!v­åÍ gamemenu.chnÍ=!v­Í´ÍbÃÅ!Í�ÍbÍRÍ�ÍbÍRÍ�Want to try again? Íbͽ!»Í8!©­ÍÛÍbÍRÍ�Íb*©­&Í(å!YÑÍaËEÊ 3!v­åÍ gamemenu.chnÍ=!v­Í´Íbnkloc: loc; myloc : loc; atack : array[1..numattackers] of loc; ch : char; left : 0..numattackers; nines : 0..ninemax; saydir : direction; dummy : file; (* * makeboard * creates the board and place every thing in at random places *) procedure makeboard; var placed : integer; xloc : xindex; yloc : yindex; i,j : integer; begin nines := ninemax; for i := 1 to width do for j := 1 to length do square[i][j]o destroy the 6 attackers. * * You can move by: * 789 * 456 * 123 * * Note that 5 leaves you in the same place. A move of 0 will put you * in some random place on the square (even on a mine) *) program dodge(input, output); const numattackers = 6; (* number of attackers *) length = 30; (* length of playing field *) width = 15; (* width of playing field *) numines = 15; (* number of mines *) ninemax = 2; (* number of times (width) end; square[yloc][xloc] := tank; tankloc.xcord := xloc; tankloc.ycord := yloc; while square[yloc][xloc] <> nothing do begin xloc := 1 + random(length); yloc := 1 + random(width) end; square[yloc][xloc] := me; myloc.xcord := xloc; myloc.ycord := yloc; end; (* * print * print out the field *) procedure print; var i : xindex; j : yindex; begin gotoxy(1,1); for j := 1 to width do begin for i := 1 to len := nothing; left := numattackers; for i := 1 to length do begin square[1][i] := mine; square[width][i] := mine end; for i := 1 to width do begin square[i][1] := mine; square[i][length] := mine end; placed := 0; while placed < numines do begin xloc := 1 + random(length); yloc := 1 + random(width); if square[yloc][xloc] = nothing then begin square[yloc][xloc] := mine; placed := pthe 9 escape can be used *) type (* what can be at a location *) what = (me,attacker,tank,mine,nothing); xindex = 0..length; yindex = 0..width; (* directions something can move *) { direction = (stay,n,ne,e,se,s,sw,w,nw,nowhere);} direction = (nowhere,sw,s,se,w,stay,e,nw,n,ne); (* the location of an object *) loc = record xcord : xindex; ycord : yindex end; var (* the playing field *) square : array[1..width,1..length] of what; tagth do case square[j][i] of me : write('*'); tank : write('T'); attacker : write('$'); mine : write('X'); nothing : write(' ') end; writeln end end; (* * move * attempt to move something from curx,cury in the direction * indicated. returns what was on the location. *) function move(var curx:xindex;var cury:yindex;where:direction): what; begin case where of n : cury := cury - 1; (* * dodge * You are in a 30 x 15 square. There are 6 attackers, one tank, * and you. If you hit one of the attackers (or the tank), you * are destroyed. If two attackers hit each other, they are randomly * put somewhere else. If an attacker hits the tank, then the * attacker is destroyed. As an added bonus, there are 15 mines * in the square (and the border of the square). If you hit a mine * you are destroyed. If an attacker hits a mine, then the attacker * is destroyed. Your object is tlaced + 1 end end; placed := 1; while placed <= numattackers do begin xloc := 1 + random(length); yloc := 1 + random(width); if square[yloc][xloc] = nothing then begin square[yloc][xloc] := attacker; atack[placed].xcord := xloc; atack[placed].ycord := yloc; placed := placed + 1 end end; while square[yloc][xloc] <> nothing do begin xloc := 1 + random(length); yloc := 1 + random   stay: ; s : cury := cury + 1; w : curx := curx - 1; e : curx := curx + 1; nw : begin curx := curx - 1; cury := cury - 1 end; sw : begin curx := curx - 1; cury := cury + 1 end; ne : begin curx := curx + 1; cury := cury - 1 end; se : begin curx := curx + 1; cury := cury + 1 end end; m which := xdir end else begin case xdir of w: if ydir = n then which := nw else which := sw; e: if ydir = n then which := ne else which := se; end end end; (* Which *) (* * checkmove * checks to see what happens to an attacker when it is moved *) procedure checkmove(i : integer; dir : what); var remember, index : 1..numattackers;  myloc.xcord := 1 + random(length); ch := '0' end; saydir := command[ch]; ask := move(myloc.xcord,myloc.ycord,command[ch]); square[myloc.ycord][myloc.xcord] := me end end; (* * moveall * moves all the attackers around, and the tank *) procedure moveall; var i : 1..numattackers; (* index used to run through all attackers *) (* * which * given a loc, it decides which direction to go so as to come closer * to you. returns the dir for the first attacker *) atack[i].xcord := 1 + random(length); atack[i].ycord := 1 + random(width); (* move the attacker *) checkmove(i,move(atack[i].xcord,atack[i].ycord,which(atack[i]))); (* repeat the same with the other attacker *) atack[remember].xcord := 1 + random(length); atack[remember].ycord := 1 + random(width); checkmove(remember,moove := square[cury][curx] end; (* * ask * ask the user where he wants to go, then attempt to go there. * returns what the player lands on. *) function ask:what; var command:array['0'..'9'] of direction; dir : direction; ch : char; i : integer; begin (* init the commands *) dir := nowhere; for ch := '0' to '9' do begin command[ch] := dir; dir := succ(dir) end; write('Direction? '); read(trm,ch); if not (ch in ['0 begin case dir of nothing : square[atack[i].ycord][atack[i].xcord] := attacker; tank : begin writeln('The tank just destroyed an attacker'); atack[i].xcord := 0; left := left - 1 end; me : begin writeln('You just died!!!'); myloc.xcord := 0 end; attacker: begin (* find out which attacker we hit *) ection. *) function which(curr : loc):direction; var xdir, ydir : direction; begin xdir := stay; ydir := stay; if myloc.xcord > curr.xcord then xdir := e else if myloc.xcord < curr.xcord then xdir := w; if myloc.ycord > curr.ycord then ydir := s else if myloc.ycord < curr.ycord then ydir := n; if (xdir = stay) or (ydir = stay) then begin if xdir = stay then which := ydir else ve(atack[remember].xcord, atack[remember].ycord,which(atack[remember]))); end; mine : begin writeln('An attacker just hit a mine.'); atack[i].xcord := 0; left := left - 1 end end; end; (* CheckMove *) begin (* MoveAll *) (* for each attacker, if he is still alive, move him toward you *) for i := 1 to numattackers do begin if atack[i].xcord <> '..'9']) or ((ch = '0') and (nines = 0)) then begin writeln('How is that? '); ask := ask end else for i := 16 to 24 do (* clear the screen under the board *) begin gotoxy(1,i); clreol; end; gotoxy(1,18); begin square[myloc.ycord][myloc.xcord] := nothing; (* on a command of '0', relocate yourself randomly *) if ch = '0' then begin nines := nines - 1; myloc.ycord := 1 + random(width);  for index := 1 to numattackers do if (atack[i].xcord = atack[index].xcord) and (atack[i].ycord = atack[index].ycord) and (i <> index) then remember := index; writeln('Two attackers just collided!'); (* remove it from the field *) square[atack[remember].ycord][atack[remember].xcord] := nothing; (* choose a random spot  0 then begin square[atack[i].ycord][atack[i].xcord] := nothing; checkmove(i,move(atack[i].xcord,atack[i].ycord,which(atack[i]))) end end; (* move the tank, note that the tank will destroy anything in its way * (including mines) *) square[tankloc.ycord][tankloc.xcord] := nothing; case move(tankloc.xcord,tankloc.ycord,which(tankloc)) of attacker : begin writeln('The tank just destroyed an attacker'); myloc.xcord := 0 else begin moveall; print end; writeln; end; if myloc.xcord = 0 then writeln('Well, you got yourself killed!!!') else writeln('Congratulations, you did it!!!'); writeln; write('Want to try again? '); clreol; read(trm,ch); writeln; until upcase(ch) <> 'Y'; assign(dummy,'gamemenu.chn'); chain (dummy) end. cker is destroyed. As an added bonus, there are ',numines); writeln(' mines in the square (and the border of the square). If you hit'); writeln(' a mine, you are destroyed. If an attacker hits a mine, then the'); writeln(' attacker is destroyed. Your object is to destroy the attackers.'); writeln; writeln(' You can move by:'); writeln(' 789'); writeln(' 456'); writeln(' 123'); writeln(' Note that a 5 leaves you in the same place. A move of 0 will'); writelprogram GameMenu; (* Menu for pascal games by Bruce Berryhill 10Jan85 *) var Answer: char; ChnFile: file; begin writeln; writeln('Hit any key to continue'); repeat read(trm,answer); clrscr; writeln ('a Baccarat'); writeln ('b Blackjack'); writeln ('c Black Box'); writeln ('d Block Letters'); writeln ('e Boggle'); writeln ('f Chuck-a-luck'); writeln ('g Dodge'); writeln ('h left := left - 1; for i := 1 to numattackers do if (atack[i].xcord = tankloc.xcord) and (atack[i].ycord = tankloc.ycord) then atack[i].xcord := 0 end; mine : writeln('The tank just destroyed a mine'); me : begin writeln('The tank just destroyed you'); myloc.xcord := 0 end; nothing : end;1!€¯¸ÿÍ�!^#K¯ͲÍRÍ�ÍbÍRÍ�Hit any key to continueÍ�Íb!»Í8!{¯ÍÛÍbÍcÍRÍ� a BaccaratÍ�ÍbÍRÍ� b BlackjackÍ�ÍbÍRÍ� c Black BoxÍ�ÍbÍRÍ�d Block LettersÍ�ÍbÍRÍ� e BoggleÍ�ÍbÍRÍ�f Chuck-a-luckÍ�ÍbÍRÍ�g DodgeÍ�ÍbÍRÍ� h Guess itÍ�ÍbÍRÍ� i HangmanÍ�ÍbÍRÍ� j Horse RaceÍ�ÍbÍRÍ�k KenoÍ�ÍbÍRÍ�ÍbÍRÍ�7Which game would you like to play? [a-k] to quit Íb!»Í8!{¯ÍÛÍb*{¯&Í(}2{¯*{¯&åÍQ!Aå!KÍkÍå*{¯&å! ÑÍNÑ}³oËEÊ *{¯&A·n(' put you in some random place on the square (even on a mine).'); writeln; writeln('Hit any key to continue'); read(kbd,ch); end; (* dodge *) begin write('Want instructions? '); read(trm,ch); writeln; if upcase(ch) = 'Y' then inst; repeat clrscr; randomize; makeboard; print; while (myloc.xcord <> 0) and (left > 0) do begin (* test to see if you killed yourself *) if ask <> nothing then  Guess it'); writeln ('i Hangman'); writeln ('j Horse Race'); writeln ('k Keno'); writeln; write ('Which game would you like to play? [a-k] to quit '); read(trm,Answer); Answer := upcase(Answer); until (Answer in ['A' .. 'K']) or (Answer = ^M); case Answer of 'A' : assign(ChnFile,'baccarat.chn'); 'B' : assign(ChnFile,'bjgame.chn'); 'C' : assign(ChnFile,'blackbox.chn'); 'D' : assign(ChnFile,' square[tankloc.ycord][tankloc.xcord] := tank end; (* * inst * prints out the instructions *) procedure inst; begin writeln(' Dodge'); writeln(' You are in a 30 x 15 square. There are ',numattackers:1,' attackers,'); writeln(' one tank, and you. If you hit one of the attackers (or the tank)'); writeln(' you are destroyed. If two attackers hit each other, they are'); writeln(' randomly put somewhere else. If an attacker hits the tank, then'); writeln(' the attaíRÂè!!K¯åÍ baccarat.chnÍ=Ã=#B·íR "!K¯åÍ bjgame.chnÍ=Ã=#C·íRÂ."!K¯åÍ blackbox.chnÍ=Ã=#D·íRÂO"!K¯åÍ block.chnÍ=Ã=#E·íRÂq"!K¯åÍ boggle.chnÍ=Ã=#F·íR•"!K¯åÍ chucklck.chnÍ=Ã=#G·íR¶"!K¯åÍ dodge.chnÍ=Ã=#H·íRÂÙ"!K¯åÍ guessit.chnÍ=Ã=#I·íRÂü"!K¯åÍ hangman.chnÍ=Ã=#J·íR #!K¯åÍ horserac.chnÍ=Ã=#K·íRÂ=#!K¯åÍkeno.chnÍ=Íc*{¯&å! ÑÍaËEÊ[#!K¯Í´ÍbÃÅíRÂI!K¯åÍ hangman.chnÍ=Ãá"J·íRÂJ!K¯åÍ horserac.chnÍ=Ã#K·íRÂK!K¯åÍkeno.chnÍ=Íc*{¯&å!   block.chn'); 'E' : assign(ChnFile,'boggle.chn'); 'F' : assign(ChnFile,'chucklck.chn'); 'G' : assign(ChnFile,'dodge.chn'); 'H' : assign(ChnFile,'guessit.chn'); 'I' : assign(ChnFile,'hangman.chn'); 'J' : assign(ChnFile,'horserac.chn'); 'K' : assign(ChnFile,'keno.chn'); end; clrscr; if Answer <> ^M then chain(ChnFile); end. ëñðHåÍ\Ë<ËÑëÍÞëËzÈ5Í+È)ýÉÍ+ÈË<ËúÉëz· {þ0G·É¯goÉë|ª|úHºÀ}»ÉÉË|È|/g}/o#É}æo&ÉíKÓí[ÑÅÕxAJSËËËËáëáíJDM!éb"Ñë!6íJ"ÓDMÉ'ͬèͬdͬ ͬ} ¯<íR0û= ÈÆ0ÝwÝ#ÉÝ~Ö$O! Ý#Ý~Í„Ö08)þ 8 !Öþ 8þ0T])Ø)Ø T]Ø)Ø_ØËy·È|‡ÉÝááå}&#9N�8wë!DíB9ùëåí°ëá+Oí¸ë#ùÝé>ÃwÝáͦWáͧ _áå}“8(º8J`9{‚T]=o`9yí¸ë ¯Ã28!?"9!É í°!á¸í°áí°>2گà Ã:ÃDÃ]ÃSÃXÃNÃ]ÃDÿ í[Ûþ (ú!eÍ}Í„þA8þQ0Gþ: xÖ@¯!\w# ( þ  ÍyÍVþ. ÍV!h6#ûÉ (þ*(þ.(þ!8þ}(þ*(Í„w#ßÉ>?> w#üÉþaØþ{ÐÖ É|Í’}õÍ›ñæÆ�'Î@'Ãè¯7Ë|À|·}È>ÿÉ"ÍíCß"í6#ûëÑùü "Ïë"ÕÍ�Í©éå*Ï·íB"Ïí[Í·íRëáÚ5í°É*Ïí°"ÏÙÉ^#V#ÙÍaÙ}.�•õ; ÙÍOÙÍJ ÅÕåÙ,ÍÖ ÙáÑÁ; ÝåÝ!U >ÍýÝá,ÙÍk-ÙÍÖ ñÅÕåo&0%ÍÑÙ,Í` ÙáÑÁÍÖ }þgÚ; É}Š�؉}颋.:}Žã8Žc~I’$I~ÍÌÌÌL«ªªª*ÙÍkÙ·Ëxõ˸; }þˆ0GÅÕå,Í™åË<Ë}áõÍÑ,-(-ÙñáÑÁõÍJ ÝåÝ!Ù >ÍÝáñ0 õÙÍaÙÍ` ñ…o8 ñÈÙÍOþ á>Ãum.`1pF,þåt6|‰„!wS<ÿÃ.zÒ}[•|%¸FXc~üïýu€Ò÷r1}·ÈÝåÙÍOÙ¯Ëx(<˸õͨ 8Ù; ñËÿõÙÏŽé!~JÙͨ 0Í÷OÝ!—>ÙÝÍ<Ùͨ 8 = ìÙ ÝÙÙÍ7ËøÍÖ ÅÕåÍ<Í` ÙÍOÍÖ ÙáÑÁ; ÝåÍ÷ÝáÙÍ7ÍÖ ñ0 õÙÍW-ÍJ ñÝáËOÈËøÉçÏÌTöô¢0 jÁ‘ €µžŠoD€‚,:Í€jÁ‘ �€!¢ÚI}袋.º}Žã8Žc~I’$I’~ÍÌÌÌL«ªªªªÝ!Ó>ÅÕåxñW^‘8/ÃwÍÖ Ð>ÃuÍJ õÍuÍ` íÙ}·Ù>(è; àÙËxÙÂQ Ù}·ÙÈÙÅÕåÙ}· Ù˸TÅËø¯ÙËø}Ù•(0íD=ÙÍC ,= ù(Ùñæ€ Í[ 0%ÍD ·, 7 Í� ?õ(8ÙÍu Ëx ÍO - öÍ; ñ8˸·ÙáÑÁÙÉÙËxÙÂÝ ÍX ÍÝ Ø,-Èxî€GÉÙ}·ÙÊ; }·ÈÙ…ÙÍ ÅÕåÝ9Í; Ù.Ù>Ý#ÝnË0Í[ ÍD = ñÙ-Ù åÝnûËx ÍP ,-(-ñññ·ñÙÁáÙÝá˸°G,-Ì; É}·ÈÙ•Ù?Í åååÝ9Ù.Ù>Í� 8Íu ?Ë= ÝuÝ+Ù-Ù(>ÍO 0ßÍu ·áÍO 8Õ^#V#N#FáÉÝáëO/o&ÿ9ùëí°ÝéÑO/o&ÿ9ùëí°éÝáë!àÿ9ùëÅ(¯üí°Á> �‘(G¯üÝéÝá!àÿ9ù ¯w#üÝéÝáEÍŠ¶wÝéÝáÑ}“8÷�Ãu·íR·íB0 É>‘î·íRëê@ðøÉÕë·íRëáë·íR!È+Éͨ õÍz ð·íR!À+Éͨ õÍz ðÍ<!Ð+Éͨ õÍz ðÍ<!ÈØ+Éͨ ôÍz ïÍ<!ÈØ#Éͨ ôÍz ïÍ<!Ø+Éͨ õÍz ðT]KBë!z·> S>)ë)ë0 = öÉ|ªõÍJëÍJëDM¯go>íjíB0 7?ËË= ðõÍuÍ` ñÍÙáÑÁÃ` õÙÍ7õÙÅÕåÍ7ÍÖ ÙáÑÁÙÍ` ñ= éÙÍOÃÖ ÝÝnÝfÝ^ÝVÝNÝFÉ!�DLT\ÉI¢Ú!‚!É53ó!�úÉr1÷!€ÒÉÅÕåÙáÑÁÉÍ\!€> Ëx Ë#ËËË-= ðo˸ÉËxÙÍO(Ëø-ÍÖ ·Ë}(ËxËø>�½8(ÍC ,óÍC `iÈÃM!É>’Ãu|µÊ; Ë|ÍJ>�Ë| )=Ë|(úDMboÀ˸Éͦë8þ8ͦÙËxÙ(’0¯þ 8> ÕÍMÑËx(>-ͲË{(aËy(Ͱͦ ò\z·(>.Ͳ (Ͱ ÷ú~ͦ÷Ë{È>EͲ>+Ë|(|íDg>-Ͳ|/Ö 0ûÆ:ÝpÝ# ý~ý#· ý+>0ÝwÝ#Éýå,-  ý60ý#ø¯ÃJÅ˸}ÙÖ€oŸgMÍÄ|þÙ <ýwíDÍ }þ�0Í€ý5Ëø>„•.ÃÉÍ«Copyright (C) 1984 BORLAND Inc‚A KAYPRO II-84d IVctedP=  ERC1B1~·7È#õå~Íáñ=ÈóÍ% ÉÅÕåÝåýåõo&åͦñýáÝááÑÁÉoåͦÉþ€Ü�Ô©æîÅÕåÝåýåÍ£}Ùå!å!"8áãõÅÕ~#·(åÍáôÑÁñãÉ}´È:$‡‡‡ããããÅÒÁ= ô+èÍÐØ*ÎßõÅÕå!¨ÍZ!¢ÍÐ*ºÔBáÑÁñÉõÅÕå!´éõÅÕå!®àõ:¼·(ÅÕå=2¼!ÈÍZáÑÁñÉõ:¼· ÷ÅÕå<2¼!ÂåõÅÕå!¼ÛõÅÕååð!‹í°Ñ:žO:œ‚ÕÍÑ:ŸO:�ƒÍ!ðÍÐ* ÍBáÑÁñÉÍ� ?áÑÁËx ÍP š, —7•8Æ€8Æ€8oÝãÙåÅxËøÙ¨æ€õËøÝåÝ!ÉáØ¯oGOW_gÉ·ËËËËËÉ·ËËËËËÉ|Ù„Ùg{Ù‹Ù_zÙŠÙWyÙ‰ÙOxÙˆÙGÉ|Ù”Ùg{Ù›Ù_zÙšÙWyÙ™ÙOxÙ˜ÙGÉxÙ¸ÙÀyÙ¹ÙÀzÙºÙÀ{Ù»ÙÀ|Ù¼ÙÉÙxÙ¨ò² xÉËx(ͼ È?É}Ù½ÙÀ·ÈÃ� }Ö�Ú; <þ(ÐÙÅÕåÍ; 7ÍD = ùÙ|Ù¤Ùg{Ù£Ù_zÙ¢ÙWyÙ¡ÙOxÙ ÙGÃD ÙÅÕåÙÍuÙÍÆ ÙÍJ ë}·ÈËx>ÂuÍu}Æ€Ë/Æ€oÖõÙÅÕå; ÍÖ -ÅÕåÍJ }áÑÁÙáÑÁã¼ã0ãñÙÉÙÍW-ÍJ ÙÍW,Ù}þlØÅ˸ͨ Á8 ; Íý Í` Ëx(ÍÖ Ù-Ùͨ õ8ÍJ Ù-Ùͨ 8Ù,ÍJ }þl8;Ùª*ªª!ªÍ` ÝåÝ!Ð >ÍýÝáÍuÍ` Í` ÅÕåÙÍu--Ù-ÍÖ ÙáÑÁÙÍJ ,,ñ,-ÈØxî€GÉgª?+2×n¶*ï8t Ð Ðzˆˆˆˆ~«ªªªª,->ÊuËxÂu  (ÍC Ë= øý~õ> xæÆ0ýwý#xæGÅÕåË%ÍP Ë%ÍP ëãÑãíZëáãíJDMáË%ÍP = ÈñÁýáÉýåá_~6þ5Øúi+~¨¥Ôh¶¿ÉìÅëx-ÐÍÎÂSÞùx9?ë+¨­ÅøÉ{Η@}·ÈËøÅÕ|ÍC ÍC „gãíZëáãíJDMá0ÍD ,7È}Æo˸ÉÍ ¾ #øyîO!@9ùi&ÝéÍ  ë¶¾ â#÷ÚÍ ¶w#ùëùÝéÍ /¦w#øï*â###w* N#Fë·íB ÈÕåÍŸÑár+sÉ>‘à ÕÙáÙ!T]>)ëíjëÙ)Ù0 0= ïÉÍU·íR!À#ÉÍUëÉ*â^#V#ÕN#F#^#VáÉ>">!2çDMÝáÑáÝå"â~æÊóx±(LÅÕÍ*â ë:çOÍÑÁ·(o:çþ" C}=(þ ?ÅÕ*â-N#Fp+qÛÿq#pÑÁ!€ë °*â F+N+++V+^ë·íBÐëq#pÉ>™>ð>à ÁÑíSâÅåÍRÑ·íRÚ*â s#r$ s#rÉ"äíSæëá"â! N#Fë·íB(^x± *â 6#ûí[âÍ<(H*â! íKäq#p##ëíKæÅÕÍí[â!Í· *â! 4 #4Ñ!€ëÁ x± Õ*â$ éÝ*â>ðÃw"òëáã"ô{æü_!í"ëÝ*íÝnÝf}´(HíR0ÝnÝfåÝ"ëÝáã Ý^ÝVÝåMDÝnÝfÝåÝÝuÝtÝqÝp ÌáñJ= ÍB== ͯ}8= ͵}/Í­ !*â###å~Æ-_~áþ(4òQ6*âËÖ>™2Ù>*â##wáÑÁÉ:Ù·>Àå*â##~áÉå*â#~þÿ(EÍÌÍ[þ ( þ (þ (þ ÍÖè!]Í[þ (þ (þ (þ(w#(ÍÖãÍÂÌÖ6áÉÝ!]Ý~·Èþ-ÀÝ#É8Ý~·È>7à ëÍ Í[ÃÖÍÖÉ>¯OÅÍkÁͼÈÅåÍÁÑÁÍÎØÌMës #rëÉÍkͼÈÅåÍpÙáÁÍÎØÙÌX ÙáåÍÌÍ[þ ÍÖôÍ[þ (þ( #w(ÍÖêÍÂÌÖáqÉ*â#~þÊáÍ[þ (þÈÍÖñÍ ÍÖþ ÀÃÖ*â##~þÈ6ÉÅÕåÍœáÑÁÉOÍ$*â#~þ(08áÅå·Ê¦=ʦ==Ê©=ʬò+ËÞ###å~Æ-_qá4ð6Í¡È>ðà *æ:è¾È4^qÉ}Ã’ÁÑÅÝ*ÛË|(program games; (* Loader fo games chain by Bruce Berryhill 10Jan85 *) var dummy: file; begin assign(dummy,'gamemenu.chn'); chain(dummy) end. Í ¦w#ùãýáÝá!9ë! E9ýéÝá!!9~·(¯+FÍŠ¦!"9ù!(#Ýé>¯2æýá*ÛͲ¯á"âýå|·>"Ê :æ·( ͆ *â6#wÉÍ÷*â6#6 ë!\$í°É!¶Ååí[Ûþ (úÍ„–( áÁã·É#ëÁÁþ:À~ÉCONTRMKBDLSTAUXUSR>¯2æÍîÍ$*â#~þ ͶÍ$*â:æ·> >w###6ÀÃÖþ þ #6++pÉ>¯2æíSäÍ-Í$Ͷ:Ù·À*â6###ww#w$w#wÖÿ:æ· åÍôá##N#F*ä·íBÈ>�à å¯w#w#í[äs#ráÃó>¯2æÍSÍ$ͶÍ$*â6å ë#Íá-¯Nw#FwÖÿq#p#6€#w#w#wÉÍß*â ë:æ·( ÕÍÑñÅÍÁ<Àxà *â6#ûÉ"â#~+þ 2ËN(>Í’ÝåÑ*ës#rÑ*ôs#rÉÝåá"Í*ò ÝåÁ Ú5íKÏíB!Úð>ÿÃuëáã~#fo{æü_ë"ò*íåÝá·íR0RÝnÝfå·íR0ÝáðáÕýáíKòýqýpýuýtÝsÝrÝåáÝNÝFÍÄ( Ý^ÝVÕÝáÝåáÝNÝFÝ^ÝV*ííSíÕÝáÝuÝtíKòÝqÝpë ·íRÀÕýá*Í·íR(ý~Ýwý~Ýwýnýf ÝuÝt¯ÉÝåá"Í6#ûÉÍ *öÉÍ *øÉ!"ö"øÝ*íÝNÝFy°(*ö "ö*ø·íB0íCøÝnÝfåÝáØ*Ïûÿ í[Í·íRØë*ö"ö*ø·íRÐíSøÉí[Ís#rÉ^#VíSÍÉ>¯O"æ¯w2Ùx2è!ê"âá"äá ÍöÍ@*äé>¯2ê"æ!ê"âá"äá"è!\Ͳ¯*è:ê· ÍîÍ!Ù~6·go(Ýåá\íRë*æs#r¯ÿí_2ÔÉëÝáÁáx±( s x±ÍMëëË|( ÍMÝ6-Ý#ÕÍ�áͦí[ÛÝåá·íRë“8 (G> Í’ùCÈ~Í’#÷ÁÑÙáÑÁÙÅÝ*ÛÕÍôÇÁÑÅͦËC!h Ç!lÀTRUEFALSEͦ!9^#Í(ÑùÕÉá~#·(G~Í’#ùé> Í’> Ã’ "âËF!ÈÍ[¸(þÀ#ÉåÍRë·íRá0Íô*â4À#4É>™Ã åÍR·íR *â4 #4(áÍóÒ>òÜ>¯2çÍ$ë*âËV(/Ë–:ç·(#~+· x· y·ú2ÅÕ!͵ÑÁ( =(þ X:ç·(R*â:ç·(ËÞ###~Æ-Õ_ÑÖ-ÍŒí âX<òN=<ÍŒ*â###æw ÅÕåÍŸáÑÁ Õ*Ñ4 #4x±ÂüëÉ>™>ðà õ:ç·(ëñÉ"âÍŸÈè"*âËÖË^ÈËž*âËVÈË–åÅ0ëÍÁá ëÍ·ÉÁÑíSâÅåÍRÑ·íR8A*â N#F#s#rÍ$ 0}æ)ëíjëS\:Ù· *âË^ îËFÈ*âå ëÍá< >ÿ2Ù6É"â~æÈÍŸ*â-¯w#wÕÿw#ÍóÍŸÀ"â~æÈ·ÍÀ ëÍ<À@ýá*ÛͲ¯áýåÍÀåÍ÷áåë!\ í°á åëÍÑ<Ê®!\$í°É>à >¯2æÍÀ*ß|µ>! ë*â \$í°\Í<(Ï!ý€í°:æ· í[1Ã�ÿÕÍ\ÍÑ!€ë·(éf"âÍÂÈ> 2ÙÉ:Ù·ÈñÉÝáÝåå!ÊÍ<áÉÝáÝå"âËF( #~þÀ#6Ãe>Îå!ÊÍ[áÉ"âËNÀ>ë!Ú~þ€8>O6*Û"ÝÍwþ (=þ(&þ("þ(þ :á·(ßÃNþ 8Øyº(Ô~#ÍèÌúx+Í% (½ï6Éå*â#~þáÉÍÂÈÍ[þÈÅÕå*â#~· *Ý~þ(h#"Ýb= Íõþ 8Íèþ(T]í°ÝéDMÝáÑá·íR0ð ë ëí¸ÝéÑÁÕ-a%ÃÆ}Í„oÉ*é!Ù~6o&ÉÍ |µÈÍ£}þÀÝáÍ%^C User break1:Ù·ÈÝáõÍ% I/OÝáÍ% Run-timeÍ% error Í’Í%, PC=Ýåáí[Õ·íR"×Í�Í% Program aborted*ßé1!€¯¸ÿÍ�! L¯Ͳ!L¯åÍ gamemenu.chnÍ=!L¯Í´ÍbÃÅ error Í’Í%, PC=Ýåáí[Õ·íR"×Í�Í% Program aborted*ßé1!€¯¸¸Í�!��Ͳ!L¯åÍ gamemenu.chnÍ=!L¯Í´  1!€¯¸ÿÍ�!™# ¯ͲÃn"ýáá"E¯ýå*E¯^#Vë"*¯!,¯Í+Í.Í_Íb!,¯Í *E¯å!(¯Íž*(¯å!ÑÍaËEÊV ÍRÍ�Please enter a numberÍ�Íb**¯ë*E¯s#r*(¯å!ÑÍNËEÊïÉÍRÍ�This is match itÍ�ÍbÍRÍ�ÍbÍRÍ�)I will choose a number between 1 and 100.Í�ÍbÍRÍ�"You will try to guess that number.Í�ÍbÍRÍ�2If you guess wrong, I will tell you if you guessedÍ�ÍbÍRÍ�too high, or too low.Í�ÍbÍRÍ� you have !å!ÍöÍ� tries to get the number.Í�ÍbÍRÍ�ÍbÍRÍ�EnjoyÍ�ÍbÍRÍ�ÍbÉÍRÍ� Your guess? Í else if guess < number then writeln('too low') else writeln('correct!!!') end end end; (* getnum *) (* * main *) begin instructions; randomize; while pos(ch,'nN')=0 do begin guess := 0; numtry := 0; number := random(maxnum)+1-minnum; (* get number *) while (numtry < maxtrys) and (guess <> number) do begin getnum; numtry := numtry + 1  dummy : file; {$I readnum } (* * instructions * prints out the instructions *) procedure instructions; begin writeln('This is match it'); writeln; writeln('I will choose a number between 1 and 100.'); writeln('You will try to guess that number.'); writeln('If you guess wrong, I will tell you if you guessed'); writeln('too high, or too low.'); writeln('you have ',maxtrys,' tries to get the number.'); writeln; writeln('Enjoy');1!€¯¸ÿÍ�!/'J®ͲÃ&ýá !v®Í²ýå!"p®!å!Á®Í ÍmÑÍ5z³Êd Õ"n®!v®å*n®Ñn&åÍQ!0å!9ÍkÍËEÊ[ *p®å! ÑÍÄå!v®å*n®Ñn&Ñå!0Ñë·íR"p®*n®#Ñà *p®"�®*�®ÉÍc!Ì®åÍ words.datÍ=!Ì® ÍÍb!Ì®Í8!Á®Í³Íb!Á®Í Íç"·®ÍíÍQ!½®ÍâÍQ!¹®Íâ!"µ®!}2´®É!å*·®ÍÑ"d®!Ì®å*d®ÍÍÍb!Ì®Í8!Á®Í³Íb!å!Á®Í ÍmÑÍ5z³Êr!Õ"b®!Á®å*b®Ñn&Í(å!¹®Í-Í}îoËEÊi!!¹®Í-ÍQ!Á®å*b®Ñn&Í(ÍaÍå!¹®Íâ*b®#ÑÃ!É!}2\®!}2[®*\®&ËEÊx"!å! ÍÍRÍ� Next guess? Íb!»Í8!]®ÍÛÍb*]®&Í(}2]®!¸b!y¯åÍç*y¯å!dÑÍ›ËEÊ"ÍRÍ�Illegal numberÍ�Íb͵!Ãm"*y¯å*x¯&ÑÍ›ËEÊ-"ÍRÍ�too highÍ�ÍbÃm"*y¯å*x¯&ÑͯËEÊV"ÍRÍ�too lowÍ�ÍbÃm"ÍRÍ� correct!!!Í�ÍbÉÍg Íí*{¯&e.åÍnNÍ|å!ÑÍNËEÊv#!"y¯!}2w¯!dÍå!Ñå!Ñë·íR}2x¯*w¯&å!Ñͯå*y¯å*x¯&ÑÍaÑ}£oËEÊò"͵!*w¯&å!Ñ}2w¯Ã¹"ÍRÍ�Íb*y¯å*x¯&ÑÍaËEÊ5#ÍRÍ�The number was *x¯&å!ÍöÍ�ÍbÍRÍ�ÍbÍRÍ�want to try again? Íb!»Í8!{¯ÍÛÍbÍRÍ�ÍbÃt"!G¯åÍ gamemenu.chnÍ=!G¯Í´ÍbÃÅumber was *x¯&å!ÍöÍ�ÍbÍRÍ�ÍbÍRÍ�want end; writeln; if guess <> number then writeln('The number was ',number); writeln; write('want to try again? '); read(trm,ch); writeln; end; assign(dummy,'gamemenu.chn'); chain(dummy) end.  writeln; end; (* instructions *) (* * getnum * get a guess from the human, * with error checking *) procedure getnum; begin write('Your guess? '); (* * wait for a character *) begin readint(guess); if guess > maxnum then begin writeln('Illegal number'); getnum end else begin if guess > number then writeln('too high') Í�ËEÊô!!ƒ®åÍ gamemenu.chnÍ=!ƒ®Í´ÍbÃu"*]®&å!½®Í-ÍËEÊN"!å! ÍÍRÍ�You have already used '*]®&ÍòÍ�'.Íb!}2[®Ãu"!½®Í-ÍQ*]®&ÍaÍå!½®Íâ!}2\®Ã�!*[®&ËEÊŸ"!å! ÍÍR! e.å!ÍqÍb*]®&å!¹®Í-Í}îoËEÊÆ"*µ®å!Ñ"µ®É!"R®! å!Í!å!Á®Í ÍmÑÍ5z³ÊW#Õ"U®!Á®å*U®Ñn&Í(å!½®Í-ÍËEÊ6#!Á®å*U®Ñn&ÍRÍòÍb*R®å!Ñ"R®ÃB#ÍR!-ÍòÍbÍR! ÍòÍb*U®#ÑÃè"! å!Í!Aå!ZÑÍ5z³Ê¦#Õ}2T®*T®&å!½®Í-ÍËEÊ›#*T®&ÍRÍòÍb*T®&#ÑÃl#*R®å!Á®Í ÍmÑÍNËEÊÃ#!}2´®É*µ®(* * GUESS IT * A computer guessing game *) program guessit (input,output); const maxtrys = 6; (* user allowed 6 tries to guess number *) maxnum = 100; (* maximum number *) minnum = 1; (* minimum number *) var ch : char; (* used to answer questions *) guess : integer; (* human's guess *) number: minnum..maxnum; (* the number itself *) numtry: 0..maxtrys; (* number od times human has guessed *)   ·íRÂé#!å!ÍÍR!0ÍòÍbÃ'%·íR $!å!ÍÍRÍ�---ÍbÃ'%·íRÂF$!å!ÍÍR!/ÍòÍb!å!ÍÍR!/ÍòÍbÃ'%·íRÂ$! å!ÍÍR!\ÍòÍb!!å!ÍÍR!\ÍòÍbÃ'%·íR¸$!å!ÍÍR!IÍòÍb!å!ÍÍR!IÍòÍbÃ'%·íRÂñ$!å! ÍÍR!/ÍòÍb!å! ÍÍR!/ÍòÍbÃ'%·íRÂ'%!å! ÍÍR!\ÍòÍb! å! ÍÍR!\ÍòÍbÉ!å!Í*´®&ËEÊc%ÍRÍ�Rats!! You guessed it!!Í�ÍbÃÿ%ÍRÍ�The word was : !Á®Í !ÍqÍ�ÍbÍRÍ�ÍbÍRÍ�9Due to the violent nature of your demise, the  wordsletters := wordsletters + [upcase(aword[i])]; end; (* * readguess : * asks for another letter that the player expects to be in the word. * a letter that already has been guessed is not accepted *) procedure readguess; var thisguess : char; invalid, erase : boolean; begin invalid := true; erase := false; while invalid do begin gotoxy(1,10); write('Next guess? '); read(trm,thisguess); thisguess := upcase(thisguess); ummy : file; (* * convert * converts a string to the number that it represents. all non-numeric * characters are ignored. *) function convert(number : word) : integer; var result : integer; strindex: integer; begin result := 0; for strindex := 1 to length(aword) do if number[strindex] in ['0'..'9'] then result := result * 10 + ord(number[strindex]) - ord('0'); convert := result; end; procedure initialize; begin clrscr; assign(dict,) do begin if upcase(aword[wordindex]) in guesses then begin write(aword[wordindex]); correctcount := correctcount + 1; end else write('-'); write(' '); end; gotoxy(10,7); for guessindex := 'A' to 'Z' do if guessindex in guesses then write(guessindex); if correctcount = length(aword) then guessedit := true; end; (* * printhang * prints the hangman *) procedure printhang; brest of theÍ�ÍbÍRÍ�scene has been censored.Í�ÍbÉÍRÍ� 'Y'; assign(dummy,'gamemenu.chn'); chain(dummy) end. öÍ�ÍbÍRÍ� Your horse * ®å!ÍöÍ� has won the race!Í�ÍbÉýáá"+®ýåÍRÍ�ÍbÍRÍ�Player number *+®å!ÍöÍ�% type 'p' to print track, cr to rollÍb!»Í8!&®ÍÛÍbÍRÍ�Íb*&®&Í(å!PÑÍNËEÊ–&Í<#*&®&å!ÑÍNËEʲ&!}2ˆ®Ã‡(Í)#}2!®Í)#}2 ®ÍQ*!®&Ía* ®&Ía*!®&å* ®&ÑÍa!"®ÍâÍRÍ� You rolled a *!®&å!ÍöÍ� and a * ®&å!ÍöÍbÍRÍ� with a total of *!®&å* ®&Ñå!ÍöÍ�ÍbÍRÍ�Which do you want? Íb!$®åÍç*$®å!"®Í-Í}îoËEÊ-(ÍRÍ�Sorry, but only *!®&å!ÍöÍ�, * ®&å!Íö  program horserace (input, output); const maxplayer = 10; maxhorses = 12; (* each player has 12 horses *) type horse = record horseloc : 0..10; togo : 0..10; end; var track : array[1..maxplayer, 1..maxhorses] of horse; numplayers : integer; curplayer : 1..maxplayer; win : boolean; i,j : integer; dummy : file; {$I readnum } procedure getnumplayers; begin write('How many players? '); readint(numplayers); rse. *) procedure movehorse (player,horsenum : integer); begin track[player,horsenum].togo := track[player,horsenum].togo - 1; track[player,horsenum].horseloc := track[player,horsenum].horseloc + 1; win := (track[player,horsenum].togo = 0); if win then begin writeln; writeln('Congratulations player ',player); writeln('Your horse ',horsenum,' has won the race!') end; end; begin (* play *) writeln; write('Player number ',player,' type ''p'' to diemax; (* * throwdie * uses the random function to throw the dice. *) function throwdie: integer; begin throwdie := 1 + random(diemax) end; (* * print. * displays the tracks. *) procedure print; var pnum : 1..maxplayer; curhorse : 1..maxhorses; length : 1..10; sum : 1..10; ch : char; begin for pnum := 1 to numplayers do begin writeln('Player number ',pnum); for curhorse := 1 to maxhorses do begin writeln;  (* main program *) win := false; getnumplayers; maketracks; curplayer := 1; while not win do (* win is set to true in procedure movehorse *) begin randomize; play (curplayer); if curplayer = numplayers then curplayer := 1 (* go back to the first player *) else curplayer := curplayer + 1 (* next player *) end; writeln; writeln; assign(dummy,'gamemenu.chn'); chain(dummy) end. (* horserace *)  while (numplayers <= 0) or (numplayers > maxplayer) do begin writeln('Sorry, only numbers between 1 and ',maxplayer,' are allowed.'); write('How many players? '); readint(numplayers) end end; (* * maketracks * initializes track.togo to the correct * handicaps, and track.horseloc to 0 to start * the game. *) procedure maketracks; begin for i := 1 to numplayers do begin track[i,1].togo := 4; track[i,2].togo := 6; track[i,3].togo :print track, cr to roll'); read(trm,ch); writeln; if upcase(ch)='P' then (* player types a P to request *) print; (* a display of the tracks *) if ch = ^C then win := true else begin die1 := throwdie; die2 := throwdie; poshorses := [die1, die2, (die1 + die2)]; write('You rolled a ',die1,' and a ',die2); writeln(' with a total of ',(die1 + die2)); write('Which do you want? '); readint(horsenum); wh write(curhorse:2,' - '); sum := track[pnum,curhorse].togo + track[pnum,curhorse].horseloc; for length := 1 to sum do if length = track[pnum,curhorse].horseloc then write(' (*)') else write(' ( )') end; writeln; writeln; writeln('Hit any key to continue'); read(trm,ch); end; writeln end; (* print *) (* * movehorse. * increments horseloc and decrements togo * to move the ho= 6; track[i,4].togo := 8; track[i,5].togo := 8; track[i,6].togo := 10; track[i,7].togo := 6; track[i,8].togo := 6; track[i,9].togo := 4; track[i,10].togo := 4; track[i,11].togo := 2; track[i,12].togo := 2; for j := 1 to maxhorses do track[i,j].horseloc := 0 end end; procedure play (player : integer); const diemax = 6; var ch : char; horsenum : integer; poshorses : set of 1..12; die1, die2 : 1..ile not (horsenum in poshorses) do begin writeln('Sorry, but only ',die1,', ',die2,', or ',(die1 + die2)); writeln(' is allowed.'); write('Which do you want? '); readint(horsenum) end; if horsenum = (die1 + die2) then movehorse (player, (die1 + die2)) else begin movehorse (player,die1); if not win then movehorse (player, die2) end end end; (* play *) begin   1!€¯¸ÿÍ�!'ý®ͲÃÚ%ýáá"-¯ýå*-¯^#Vë"¯!¯Í+Í.Í_Íb!¯Í *-¯å!¯Íž*¯å!ÑÍaËEÊV ÍRÍ�Please enter a numberÍ�Íb*¯ë*-¯s#r*¯å!ÑÍNËEÊïÉÍRÍ� Input your !å!ÍöÍ� spots, one at a time. (max 80)Í�Íb!}2 ¯ÍQ !f¯Íâ* ¯&å!ÑͯËEÊÅ!ÍíÍRÍ�Spot #* ¯&å!Ñå!ÍöÍ� ? Íb! ¯åÍç* ¯å!Ñͯå* ¯å!PÑÍ›Ñ}³oËEÊI!ÍRÍ�illegal spot number.Í�ÍbÃÂ!* ¯å!f¯ Í-ÍËEÊ•!ÍRÍ�You have already chosen spot * ¯å!ÍöÍ�ÍbÃÂ!* ¯&å!Ñ}2 ¯!f¯ Í-ÍQ* ¯ÍaÍå !f¯ÍâÃÀ É! *) cost = 1.20; (*cost to play a game *) type spottype = set of 1..totalspots; var compspots : spottype; (* spots the computer chooses *) playerspots : spottype; (* player's spots *) money : real; (* player has this much money *) ch : char; (* input char to see if user wishes to conyinue *) dummy : file; {$I readnum } (* * getspots * get the player's 8 spots from him *) procedure getspots; var Í�ÍbÍRÍ�ÍbÉ!ÍÑÙ!`¯Í¡*_¯&Í(å!NÑÍaËEÊL&Íg ÍÆ!Íù"ÍRÍ�ÍbÍRÍ�Want to play Keno again? Íb!»Í8!_¯ÍÛÍbÍRÍ�ÍbÃç%ÍRÍ�ÍbÍRÍ�&All right then leave, see if i care!!!Í�Íb!`¯ÍüÅÕå!ÍÑÙáÑÁÍ}ËEÊÐ&ÍRÍ� You made $!`¯ÍüÅÕå!å!Í@Í�ÍbÃü&ÍRÍ� you lost $!`¯Íü˸ÅÕå!å!Í@Í�Íb!/¯åÍ gamemenu.chnÍ=!/¯Í´ÍbÃÅEÊstÍRÍ� You made $!`¯ÍüÅÕå!å!Í@Í�1 + (random(totalspots)); if not (spot in compspots) then begin compspots := compspots + [spot]; i := i+1; end; end; (* * print out the computer's spots in * order by going linearly through * all numbers *) i := 0; spot := 0; while i totalspots) then writeln ('illegal spot number.') else if spot in playerspots then  program keno (input,output); const payoff5 = 10; (* for 5 spots player gets $10 *) payoff6 = 100; (* for 6 spots player gets $100 *) payoff7 = 2200; (* for 7 spots player gets $2200 *) payoff8 = 25000; (* for 8 spots player gets $25000 *) totalspots = 80; (* total of 80 possible spots *) numcompspots = 20; (* computer picks 20 spots *) numplayerspots = 8; (* player gets 8 spots  writeln end; (* * score * find out how much (if anything) the * player has won *) procedure score; var i : 0..numplayerspots; (* number of matches made *) spot : 1..totalspots; (* current spot number *) begin money := money - cost; (* charge for the card *) i := 0; for spot := 1 to totalspots do if (spot in compspots) and (spot in playerspots) then i :=+ i+1; if i in [5,6,7,8] then begin write('You lucky person, you hþ®&å!ÍöÍbÍRÍ� matchesÍ�ÍbÍRÍ�That means you have made Íb*þ®&·íRÂP$ÍR! å!ÍöÍ�Íb!`¯ÍüÅÕå! ÍÑÙáÑÁͳ Ù!`¯Í¡Ã%·íRÂ�$ÍR!då!ÍöÍ�Íb!`¯ÍüÅÕå!dÍÑÙáÑÁͳ Ù!`¯Í¡Ã%·íRÂÊ$ÍR!˜å!ÍöÍ�Íb!`¯ÍüÅÕå!˜ÍÑÙáÑÁͳ Ù!`¯Í¡Ã%·íRÂ%ÍR!¨aå!ÍöÍ�Íb!`¯ÍüÅÕå!¨aÍÑÙáÑÁͳ Ù!`¯Í¡Ã<%ÍRÍ�Sorry, but you only matched *þ®&å!ÍöÍ�ÍbÍRÍ�Íb!`¯ÍüÅÕå!ÍÑÙáÑÁÍ}ËEʘ%ÍRÍ�Your total money is $!`¯ÍüÅÕå!å!Í@Í�ÍbÃÐ%ÍRÍ�So far you have lost $!`¯Íü˸ÅÕå!å!Í@ writeln ('You have already chosen spot ',spot) else begin i := i+1; playerspots := playerspots + [spot] end end end; (* * computer * have the computer pick its spots *) procedure computer; var i : 0..numcompspots; (* number of spots chosen so far *) spot : 0..totalspots; begin i := 0; compspots := []; writeln ('The computer chooses '); while i < numcompspots do begin spot :=   ave ',i); writeln(' matches'); write('That means you have made '); case i of 5: begin writeln(payoff5); money := money + payoff5 end; 6: begin writeln(payoff6); money := money + payoff6 end; 7: begin writeln(payoff7); money := money + payoff7 end; 8: begin eadln(nextword); end; writeln('That''s all, folks!'); seek(dict,0); nextword := ''; str(numwords,nextword); write(dict,nextword); close(dict); assign(dummy,'hangman.chn'); chain(dummy) end.  writeln(payoff8); money := money + payoff8 end; end end else writeln('Sorry, but you only matched ',i); writeln; if money >= 0 then writeln('Your total money is $',money:4:2) else writeln('So far you have lost $',abs(money):4:2); writeln end; begin money := 0; while upcase(ch) <> 'N' do begin getspots; computer; score; writeln; write('Want to play Keno again? '); program makedict; (* * this program makes the datafile that is used by the hanggman game. *) const stringsize = 10; type word = string[stringsize]; var dict : file of word; nextword : word; numwords : integer; dummy : file; (* * the dictionary for hangman is a file of strings. it cannot be a text * file because seeking is not allowed on text, and hangman uses a random * seek to get the word. the first string in the file contains the * number of words in th1!€¯¸ÿÍ�!¼!�®Ͳ!"¿®Í !Á®Í²!Ì®åÍ words.datÍ=!Ì® ÍÍb!å!å!Á® Ít!Ì®Í[!Á®ÍÒÍbÍRÍ�>Type the words to be entered into the dictionary; no more thanÍ�ÍbÍR! å!ÍöÍ�& letters long. Type control-Z to exit.Í�ÍbÍ !Á®Í²!Á®Í+ Í.Í_Íb!¸Í�}îoå!Á®Í Ímå!ÑÍ›Ñ}£oËEÊ:!!Ì®Í[!Á®ÍÒÍb*¿®å!Ñ"¿®Í !Á®Í²!Á®Í+ Í.Í_ÍbÃÚ ÍRÍ�That's all, folks!Í�Íb!Ì®å!ÍÍÍbÍ !Á®Í²*¿®å!å!Á® Ít!Ì®Í[!Á®ÍÒÍb!Ì®Í-Íb!�®åÍ hangman.chnÍ=!�®Í´ÍbÃÅÍ�That's a read(trm,ch); writeln end; writeln; writeln('All right then leave, see if i care!!!'); if (money >= 0) then writeln('You made $',money:5:2) else writeln('you lost $',abs(money):5:2); assign(dummy,'gamemenu.chn'); chain(dummy) end. e dictionary. *) begin numwords := 0; nextword := ''; assign(dict, 'words.dat'); rewrite(dict); str(0,nextword); write(dict,nextword); writeln('Type the words to be entered into the dictionary; no more than'); writeln(stringsize:1,' letters long. Type control-Z to exit.'); nextword := ''; readln(nextword); while not eof(con) and (length(nextword) > 0) do begin write(dict,nextword); numwords := numwords + 1; nextword := ''; r  (* a procedure to input numbers with verification *) (* Bruce Berryhill 13 Jan 85 *) procedure readint(var innum: integer); var instring : string[20]; temp, error : integer; begin repeat temp := innum; (* save the variable *) readln(instring); (* input a number string *) val(instring,innum,error); (* convert the string into a number *) if error <> 0 then begin (* the string waåååsn't a number *) writeln('Please enter a number'); (* so prompt for a number *) innum := temp; (* and restore the variable *) end; until error = 0; end; ååååå  åååååååååå  åååååååååå  åååååååååå!  åååååååååå"  åååååååååå#  åååååååååå$  åååååååååå%  åååååååååå&  åååååååååå'  åååååååååå