TD<uZi  YATZ 9816 Copyright (C) 2005 by Howard OwenThis program is free software. You may use it under the terms of the GNU General Public License (GPL) version 2 A copy of this license is included in this image in thePublic License (GPL) version 2 A copy of this license is included in this image in theluded in this image in thecopy of this license is included in this image in the in theB9826 v   Ӌ|GPLV20 I 9$README Y7 IYATZ9816 PP YATZA R: C3 DICE  Z  DX[=] Jnt its recipients to know that what they have is not the original, so Gthat any problems introduced by others will not reflect on the original authors' reputations. @ Finally, any free program is threatened constantly by softwareCpatents. We wish  yhe Program or any derivative work under copyright law:Athat is to say, a work containing the Program or a portion of it, Deither verbatim or with modifications and/or translated into anotherFlanguage. (Hereinafter, translation is included without limitdom to share and change freeDsoftware--to make sure the software is free for all its users. This;General Public License applies to most of the Free Software FFoundation's software and to any other program whose authors commit toFusing it. (Some other  you if you 7distribute copies of the software, or if you modify it. B For example, if you distribute copies of such a program, whetherEgratis or for a fee, you must give the recipients all the rights that Dyou have. You must make sure that they, t to avoid the danger that redistributors of a free Fprogram will individually obtain patent licenses, in effect making theEprogram proprietary. To prevent this, we have made it clear that any Gpatent must be licensed for everyone's free use or not licen%ation in?the term "modification".) Each licensee is addressed as "you". DActivities other than copying, distribution and modification are not@covered by this License; they are outside its scope. The act ofFrunning the Program is not restricted, and$ Free Software Foundation software is covered byEthe GNU Library General Public License instead.) You can apply it to your programs, too. B When we speak of free software, we are referring to freedom, notFprice. Our General Public Licenses are deGoo, receive or can get theCsource code. And you must show them these terms so they know their rights. H We protect your rights with two steps: (1) copyright the software, andD(2) offer you this license which gives you legal permission to copy,&di /sed at all. @ The precise terms and conditions for copying, distribution andmodification follow. GNU GENERAL PUBLIC LICENSEB TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATIONE 0. This License applies to any program or  the output from the Program>is covered only if its contents constitute a work based on theAProgram (independent of having been made by running the Program). 6Whether that is true depends on what the Program does.A 1. You may copy and distribute ver6 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 8 Copyright (C) 1989, 1991 Free Software Foundation, Inc.9 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA = Everyone is permitted to copy and distribute verbatim copies : of signed to make sure that youFhave the freedom to distribute copies of free software (and charge forEthis service if you wish), that you receive source code or can get it Dif you want it, that you can change the software or use pieces of it@in new free stribute and/or modify the software.F Also, for each author's protection and ours, we want to make certainAthat everyone understands that there is no warranty for this free Hsoftware. If the software is modified by someone else and passed on, weGwa other work which contains Da notice placed by the copyright holder saying it may be distributedFunder the terms of this General Public License. The "Program", below,Erefers to any such program or work, and a "work based on the Program" Dmeans either tthis license document, but changing it is not allowed. Preamble ? The licenses for most software are designed to take away your Dfreedom to share and change it. By contrast, the GNU General PublicFLicense is intended to guarantee your freeYprograms; and that you know you can do these things.B To protect your rights, we need to make restrictions that forbidFanyone to deny you these rights or to ask you to surrender the rights.GThese restrictions translate to certain responsibilities for7 [=ded that you also meet all of these conditions: C a) You must cause the modified files to carry prominent notices B stating that you changed the files and the date of any change.F b) You must cause any work that you distribute or publish, ty print such an announcement, your work based on: the Program is not required to print an announcement.) =These requirements apply to the modified work as a whole. If Didentifiable sections of that work are not derived from the Program,Band can  ~n of another work not based on the ProgramEwith the Program (or with a work based on the Program) on a volume of Da storage or distribution medium does not bring the other work underthe scope of this License.D 3. You may copy and distribute the ProToftware interchange; or,E c) Accompany it with the information you received as to the offer B to distribute corresponding source code. (This alternative is? allowed only for noncommercial distribution and only if you D received the progr,batim copies of the Program's ?source code as you receive it, in any medium, provided that you Cconspicuously and appropriately publish on each copy an appropriate @copyright notice and disclaimer of warranty; keep intact all theFnotices that refer to uhat inC whole or in part contains or is derived from the Program or any E part thereof, to be licensed as a whole at no charge to all third , parties under the terms of this License.D c) If the modified program normally reads commands intbe reasonably considered independent and separate works inCthemselves, then this License, and its terms, do not apply to those Bsections when you distribute them as separate works. But when youEdistribute the same sections as part of a whole which is a gram (or a work based on it,Eunder Section 2) in object code or executable form under the terms of FSections 1 and 2 above provided that you also do one of the following:D a) Accompany it with the complete corresponding machine-readableF sourcethis License and to the absence of any warranty;Cand give any other recipients of the Program a copy of this License along with the Program. EYou may charge a fee for the physical act of transferring a copy, and Gyou may at your option offer warranteractively> when run, you must cause it, when started running for suchD interactive use in the most ordinary way, to print or display an@ announcement including an appropriate copyright notice and aF notice that there is no warranty (or els  work based Eon the Program, the distribution of the whole must be on the terms of Athis License, whose permissions for other licensees extend to the Ientire whole, and thus to each and every part regardless of who wrote it. EThus, it is not the inte ! code, which must be distributed under the terms of SectionsL 1 and 2 above on a medium customarily used for software interchange; or,B b) Accompany it with a written offer, valid for at least threeB years, to give any third party, for a chary protection in exchange for a fee. E 2. You may modify your copy or copies of the Program or any portion =of it, thus forming a work based on the Program, and copy and Bdistribute such modifications or work under the terms of Section 1;above, provie, saying that you provideA a warranty) and that users may redistribute the program under E these conditions, and telling the user how to view a copy of this B License. (Exception: if the Program itself is interactive butD does not normall +nt of this section to claim rights or contest Eyour rights to work written entirely by you; rather, the intent is to ?exercise the right to control the distribution of derivative or &collective works based on the Program.FIn addition, mere aggregatioge no more than yourA cost of physically performing source distribution, a complete A machine-readable copy of the corresponding source code, to be E distributed under the terms of Sections 1 and 2 above on a medium 2 customarily used for s7 [=O? on it. E 6. Each time you redistribute the Program (or any work based on the AProgram), the recipient automatically receives a license from the Foriginal licensor to copy, distribute or modify the Program subject to;these terms and conditions. You Drmit royalty-free redistribution of the Program byEall those who receive copies directly or indirectly through you, then Cthe only way you could satisfy both it and this License would be to 2refrain entirely from distribution of the Program.EIf any p  the source code for all modules it contains, plus any?associated interface definition files, plus the scripts used to Fcontrol compilation and installation of the executable. However, as a?special exception, the source code distributed need not includ~ram isFvoid, and will automatically terminate your rights under this License.DHowever, parties who have received copies, or rights, from you underDthis License will not have their licenses terminated so long as such"parties remain in full compliance.  may not impose any further Frestrictions on the recipients' exercise of the rights granted herein.DYou are not responsible for enforcing compliance by third parties to this License. E 7. If, as a consequence of a court judgment or allegation of pat 8ortion of this section is held invalid or unenforceable under Fany particular circumstance, the balance of the section is intended to>apply and the section as a whole is intended to apply in othercircumstances.CIt is not the purpose of this section e Aanything that is normally distributed (in either source or binary Dform) with the major components (compiler, kernel, and so on) of theDoperating system on which the executable runs, unless that component"itself accompanies the executable.@If dis D 5. You are not required to accept this License, since you have notDsigned it. However, nothing else grants you permission to modify orBdistribute the Program or its derivative works. These actions areCprohibited by law if you do not accept this Li ent Dinfringement or for any other reason (not limited to patent issues),Cconditions are imposed on you (whether by court order, agreement or Fotherwise) that contradict the conditions of this License, they do not>excuse you from the conditions of thisto induce you to infringe any Dpatents or other property right claims or to contest validity of any@such claims; this section has the sole purpose of protecting the * Copyright (C) H This program is free software; you can redistribute it and/or modifyH it under the terms of the GNU General Public License as published byE the Free Software Founute software through any other system and a licensee cannot impose that choice. EThis section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License.  C 8. If the distribution and/or use of the ProEamGspecifies a version number of this License which applies to it and "any Ilater version", you have the option of following the terms and conditions Deither of that version or of any later version published by the FreeISoftware Foundation. If the ProTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHENFOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIESJPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSEDDOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRA {E WITH ANY OTHEREPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES." END OF TERMS AND CONDITIONS 2 How to Apply These Terms to Your New ProgramsE If you develop a new program, and you Rgram is restricted in Ecertain countries either by patents or by copyrighted interfaces, the Coriginal copyright holder who places the Program under this License Bmay add an explicit geographical distribution limitation excludingCthose countries, so thgram does not specify a version number of Lthis License, you may choose any version ever published by the Free Software Foundation. E 10. If you wish to incorporate parts of the Program into other free Iprograms whose distribution conditions are dif ,NTIES OFIMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS FTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THEHPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,REPAIR OR CORRECTION.  want it to be of the greatest Fpossible use to the public, the best way to achieve this is to make itKfree software which everyone can redistribute and change under these terms. F To do so, attach the following notices to the program. It is safestC7 [=y nd calculators in my collection. The aim is Eto have fun coding on antique computer platforms, particularly ones I Cused when I was starting out in the computer industry. The Hewlett :Packard 9816 (a.k.a. "HP 9000 model 216") was one of those machines, with their primitive BASICs that couldn't have kept up with the 2tasks this machine seemed to juggle with aplomb. FNot only was the BASIC fast, but it was unlike any BASIC I had used up=to that time, or any I have used since. It was a mature, full ldation; either version 2 of the License, or ' (at your option) any later version. C This program is distributed in the hope that it will be useful, B but WITHOUT ANY WARRANTY; without even the implied warranty ofA MERCHANTABILITY or FITNE)ils.KThe hypothetical commands `show w' and `show c' should show the appropriate Iparts of the General Public License. Of course, the commands you use may Hbe called something other than `show w' and `show c'; they could even be8mouse-clicks or menuicense instead of this License. ublic License instead of this License. use the GNU Library General the $[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1] ~t 똃~tV,"YV,OYOK8\tV\Yt4 PVGYYYF u~t] V WHv . ;My first job as a programmer out of school was with a small Ehydrographic survey company called Meridian Ocean Systems in Ventura, @California. They used this cool little 68000 based computer as aEcontroller for radio navigation and bathymetric haSS FOR A PARTICULAR PURPOSE. See the 0 GNU General Public License for more details.E You should have received a copy of the GNU General Public License ? along with this program; if not, write to the Free Software M Foundation, Inc., 51 F items--whatever suits your program.GYou should also get your employer (if you work as a programmer) or your Dschool, if any, to sign a "copyright disclaimer" for the program, if.necessary. Here is a sample; alter the names:H Yoyodyne, Inc., here  YATZ 9816 Table of Contents I BackgroundII The GameIII How to Play IV Scoring  a The Lower Half b The Upper Half c Zeroing and SuchV Ending the Game  a Ending the Game Normally b crdware. The machine Dtook readings from all of its devices, performed reductions, such as?converting the radio nav ranges into a fix, logged this data to Efloppy, and displayed it in graphical and text form. This was quite a Ffeat for machines of the dYranklin St, Fifth Floor, Boston, MA 02110-1301 USA HAlso add information on how to contact you by electronic and paper mail.FIf the program is interactive, make it output a short notice like this&when it starts in an interactive mode:> Gnom by disclaims all copyright interest in the programJ `Gnomovision' (which makes passes at compilers) written by James Hacker.& , 1 April 1989 Ty Coon, President of ViceKThis General Public License does not permit incorporat  Ending the Game Abnormally VI License  I BackgroundESkip down to "The Game" if the ramblings of program authors bore you. EYATZ 9816 is the second in a series of implementations of the game of EYahtzee on old computers aay (I started with MOS in 1985, but the 9816?had been introduced in 1981.) I was even more astonished by the Cmachine's performance when I learned that it was being driven by an Finterpreted variant of BASIC! I was used to the Apple II and CommodoreC64ovision version 69, Copyright (C) year name of authorM Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. A This is free software, and you are welcome to redistribute it 8 under certain conditions; type `show c' for deta`ing your program into Gproprietary programs. If your program is a subroutine library, you may Kconsider it more useful to permit linking proprietary applications with the Elibrary. If this is what you want to do, use the GNU Library General 'Public L7 [= 1 Long variable names. No "A1$" or "K2=K1*P1 + 32*N3? 2 Comprehensive loop control WHILE/END WHILE, REPEAT/UNTIL ( and LOOP/END LOOP were all presentC 3 A robust multiway decision mechanism: SELECT/CASE/END SELECT. 1 4 Structured condi. the command mode used the latter to terminateDinput. Pressing the former would get you a terse and unhelpful errorAmessage. Disk access was via long device address designators. To >access the file named "YATZ9816" on the right hand drive of an:attach  very nice to work in. The Bline termination key changed to ENTER, for one thing. As you addedAlines, they would scroll off the top of the screen. But using the D"knob", a disk at the top of the keyboard that could be rotated withCone finger of the left nd delete lines and characters. The command mode was Aavailable in edit mode too. Yo would press the CL-LN key to get a Dblank line with no line number, type your command mode command, thenDterminate input with EXECUTE instead of ENTER. In this way youtionals IF/THEN/ELSE/END IF @ 5 First class SUBprograms. With call by reference and/or by I value SUBs could live in seperate files and be CALLed across files. G 6 First class functions DEF FN* with all the properties of SUBs but  retued 9121D dual floppy for example, you would refer toD"YATZ9816:HP8290X,701,1". The "HP8290X" referred to the 9121 device,Cwhich the 9816 used 8290X emulation to access. The 701 referred to Ethe interface at internal select code 7. In this case, that sp  hand while the rest of your fingers remained Epoised over the typing keys, you could scroll up and down through the Dlisting fairly rapidly. Pressing the shift key and rotating the knobEwould toggle horizontal and vertical scrolling, so you could reach couldFexecute FIND and REPLACE commands, and if you had the BASIC extensionsEloaded, the COPYLINES and MOVELINES commands. All of these were a bit :slow on an 8Mhz 68K based 9816, but they got the job done.@We used 220 and 320 machines to do the devrning a value.I 7 Common blocks. COM /Name/ var1, var2 ..varN. The name was optional. A These could appear anywhere in the body of a program. or a G SUB/DEF FN.Any number of these were supported up to the limit of memory. G 8 ecified Fthe built in HP-IB buss, with a 9121 hanging off it at address 1. TheCfinal 1 was a unit select code. The two 9121 floppies were number 0 Fand 1 for the left and right hand drives, respectively. All this had aEvery awkward 1970s/proprietary m  an Dedit point in a line with motions that soon became intuitive. It wasEthe fastest text navigation environment that didn't involve searching EI had seen up to then. (vi, with :/string/ was faster at getting to a Dparticular place.) It was only beat'elopment for the fieldEsoftware, and they could have enough RAM to comfortably run the BASIC Cextensions that were a no-no in the field on the memory constrained C9816s. This allowed us to use some of the nice soft key features to @enhance our developm?featured, structured and elegant language, that allowed for the @construction of admirably modularized programs that were easy toDmaintain, because they were easy to understand. Some of the features.of HP BASIC 2.1 that contributed to this were:8 (Compiled subroutines. CSUBs written in HP Pascal could be called  from BASIC.  CThe BASIC "operating system" started out in a command mode that was Frather cryptic and unfriendly. The keyboard had both ENTER and EXECUTEDkeys, for example, andainframe kind of feel to it. But that wasn't the end of the story.FA program editor was built in to the BASIC environment. It was reachedAby typing "EDIT" followed by the EXECUTE key. Here you were in an Eautonumbering environment that was actually  en in my experience by GUIs thatEprovided scrolling widgets. (I used one such environment, AmigaOS and FIntuition, at about the same time I was programming the 9816.) Use ofDthe editor environment was facilitated by dedicated function keys to=insert a7 [=k d "Roll". YATZ will roll theBdice you threw away, and present you with the apportunity to throwDaway unwanted dice again. This is your last chance to do this. AfterCthree rolls, YATZ will proceed to the scoring. If you like the dice ?you have and don'tA that doesn't already have a score will Dbe highlighted in inverse video. This means that it is selected. YouDchange the selection by using the knob or the arrow keys to move theBhighlight to successive slots. Yatz will only let you select slots:that decode for the program. But since I wantedEit to run on basic BASIC, I had to relearn which nicities to avoid in Dthe code. You will notice that I have coded a FNMin and FNMax to get6around the lack of the built in MIN and MAX functions. II5/Desel", the image of >the leftmost die will go away, leaving the cursor underline inFplace. If you press the spacebar again, the image of the die will comeFback. In this way you can select and unselect that die for replacementEin the next roll. To mo s want to throw any of them away, you have two Dchoices. You can press the soft key labled "Score" to go directly toFscoring your dice. You can also just press ENTER without selecting anyFdice to throw away. YATZ will take the hint and proceed to the scoson't already have scores. (YATZ itstelf is a partialFexception. See below.) When you reach the slot where you want to placeByour roll, press the ENTER key, and your score will be tallied forFthat slot. If the score card is not full, you will be presenteent environment beyond the very nice base HPFstarted us out with. So you could, for instance, program soft keys toBswitch the default mass storage device between left and right hand>9121 drives, and a hard disk too, without having to type thoseFgodawf The GameEYatz is a well known game that involves 5 dice and scoring similar to Dpoker. You roll five dice to start, then "draw" by rolling the onesDyou don't like again to try and improve your hand. Beyond that briefDdescription, I will defer ve the cursor to another die, use the knob or Fthe arrow keys. The cursor will follow the direction of the arrows orDthe turning of the knob to rest under each die in succession. If youDkeep turning the knob after the cursor has reached the left or rig ringin this case, too. IV Scoring FWhen your three turns are up (or earlier than that if you choose) YatzEwill leave the dice rolling mode and enter scoring mode. The "Roll N" Alabel on the right top of the screen will change to onul device designators. One bugaboo that kept coming up with thisFwas the use of the actual BASIC language extensions in the programs weDwrote. You couldn't include these if the extensions weren't going toDbe available on the target machine. So that mea)detailed treatments of the rules until thediscussion of the scorecard.  III How to Play EWhen the program starts, you will see a line of five dice depicted at Dthe top of the screen. To their right will appear the words "Roll 1"CBe ht?edge, the program will beep at you. Once the cursor is under a Fparticular die, you can toggle it off and on in the same way describedEabove. When you have toggled off all the dice you want to throw away, Fpress the ENTER jey, or the soft key lable e that says A"Score." Yatz's score card has thirteen entries, or "slots," with Flabels identifying the type of score. You are expected to select whichEslot you want your dice score to be entered in. When you start out in Escoring mode, the topmost slotnt avoiding the nice@string handling functions like TRIM$, RPT$ and others, and handyBlittle functions like MAX and MIN. I actually had the same troubleCwith YATZ9816. There was barely enough room on my 512K 9816 to load Fthe extensions and the source low all this will appear the scorecard, empty at first. Below the Dleftmost die image, an underline cursor will appear. That indicatesCthat the leftmost die is "selected" for turning on and off. If you Epress the space bar, or the soft key labled "Sel7 [=d with aDnew set of five dice, and the process of rolling will begin all overagain. IV.a The Upper HalfDThe first six slots are the "upper half" of the score card. (In YATZD9816, the "upper" half is on the left and the "lower" half iwill score if you Cget three of each die value in the upper half. You can also get the >bonus by scoring four of something large and less of something.smaller. It's a "mix and match" kind of thing. IV.b The Lower Half DThe other seve it for Ethe particular slot for the rest of the game. YATZ is an exception to Dthe first rule, but not to the second. That is, if you put a zero in?the YATZ slot, you can't score YATZ anymore for the rest of the Dgame. However, if you do get a YATZ, t  License Copyright (C) Howard Owen 2005DThis program is free software; you can redistribute it and/or modifyDit under the terms of the GNU General Public License as published byAthe Free Software Foundation; either version 2 of the License,zs besideCit, on the right.) Each lower half slot represents one of the dice Evalues, numbered one through six. You have to try to fill each of the Cslots in the upper half with dice of the corresponding value. So if Eyou end up rolling three fours, fon slots in the thirteen slot score card are the "lower>half." They have various values and scoring rules given below:Name Scoringbut WITHOUT ANY WARRANTY; without even the implied warranty of=MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ,GNU General Publ}r example, you could select the "4" Cslot, and your three fours would be scored as 3 x 4 = 12 points. If Eyou had four fours, that would be 16 points. two fours would be eight Dand so forth. You could even have zero fours, which would score zeroDpointsor more) dice with the same number,  Sum of all dice in the hand3Full house. Three of a kind plus a pair. 25 points 8Small Straight Run of four dice in sequence. 30 points.8Large Straight Run of five dice in sequence. 40 points..YATZ! Five of   V Ending the Game  Ending the Game NormallyCIf all thirteen slots in the score card are filled, YATZ will print Dthe totals of the upper and lower halves together with the bonus, ifFany. It will then print the grand total, with blinic License for more details.AYou should have received a copy of the GNU General Public License ;along with this program; if not, write to the Free Software JFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.@The author may b. You want to try to average at least three of each of the sixCdie values in the corresponding upper half slot. That's because you Cget a bonus of thirty five points if your upper half score is sixty Ethree or above. That happens to be exactly what you a kind. 50 points, repeatable!-Chance??. Any old dice. Sum of all the dice. " IV.c Zeroing and SuchFYou can only fill most of these slots once. You can put zero in any ofEthe slots if you have nothing better to play, but then that is uking text and exit. " Ending the Game AbnormallyDIf you get sick of the game while playing it, you may want to end it9early. You can do this by pressing softkey labled "Quit". <(Throwing the machine against the wall is not recommended.) Fe contacted by electronic mail at hbo@egbok.com.he author may be contacted by electronic mail at hbo@egbok.com. 07, USA. ,Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1] ~t 똃~tV,"YV,OYOK8\tV\Yt4 PVGYYYF u~t7 [=   @  @ Ԅղ@ %!&!@  %됳@ % !@   Բ@ %'Ӳ@  &(%ղ@ *&ղ@ 4$@ >%%ꐳ@ H@ Rꐳ@& \&ꐳ Score isn't final@ & fԲ@ p@ z |@ B DH0PX08`h0tpx000(0d00q`Corner OnedieSpotsEraseCwChQwQ A Init_gameIBasesXYCurrCurrdieOlddieDiceDice DimensionsWHPad ScorecardScoreFinalQuitRoll Scorecard Dont_care FNRoll_diceLableToggleToggleRollScoreQuitCheckkeyCheckkeySpinSpinToggleK$FNMaxFNMinCursorSlotRet e@  ǁ됳@ 됳NT@  @ "@ @ "Բ@ ,@ 6Ӳ@ @ղ@  J Sel/Desel@ TRoll@ ^Score@ hQuit@ r@  | )@ ԁղ@  @ @ @  @   @ʑ2Done!@ Խ@ ޶@@ 趎4 **K* Main Program End@ @@4 ) SUB Onedie(INTEGER Spots,OPTION hTqwTqhCorner DimensionsWHPadCenterCenterUprightUprightLowleftLowleftUpleftUpleftLowrightLowrightMidleftMidleftMidrightMidrightExitExitSpotSpot+@ L @J V!!!!!!&*  FNSelect_slotFNScore@  YATZ 9816 v 1.0@.# Copyright (C) 2005 by Howard Owen@F.: Released under the GNU General Public License, version 2@NF(B A copy of the GPL in LIF format is on the disk image distributed v @  ղ@    @  萳@ Ӳ@ ղ@ @   @  !@ ! 񎷳@  ղ@  @ @ &! @* 0 2< AAL Erase)@@45 Draw or erase the image of one die with rank given@@@5 'Spots'. If optional param Erase is present, erase@@@4 the image by setting PEN -1.Otherwise, set PEN 1.@@@$5 This SUB relies on the calling context to 9 Half, quarte and three-quarter dimensions@,J ` ! Flag whether to draw corners@, j ! ! @  t 퐳@ ~ 퐳@  򷐳 @  ꐳ@   퐳@  퐳@  萳@   @ ĸ@  큿@  6O@ D 8" D,  $, 2 8 D FHLV\b @LN2A with this program. You can also obtain a copy of the license at@DL<9 the following URL: http://retrocalculator.com/GPLV2.txt@DDF8 The author may be contacted via email to hbo@egbok.com@ DP @ ZԲ@ d!@ n! 2Vted @* :"Ӂղ@* D2>2^ted @* N#Ӆղ@  X2E^@ b@ l賎@  v$@ @ @ 賎@  $@ @ @  $Բ@   position@:@./ the graphics cursor to the appropriate place@ :8@B @  !  $( , 4 #hnx00"00 F0z0 !"#$'(daeDicedice DimefsionsW ! @x!! @! @! ! @! @!!!@ @   UNTIL Quit@ ! NTIL Q@ ǁ됳@ Ҵ됳NT@" ܻ  UNTIL Final (Score)@"  UNTIL 7 [= O@  $@( BDie value out of range: @ ( @ & 0@ : @  D@ N @  X b@  l @ v@  @   @   @ @  @    cursorFNStartx@  @ $! @ .@ 8ղՁղ@ B@ Lղղ@( V NB:Changing Olddie/Currdie@( `@  j@"  t FNStartx(INTEGER Die)@P" ~D  *, . 2  Draw_cursorXPBasesHisxY DimensionsWHPadMyp@  @ ! @ (! @  2 !@ <!@  F o@  ^@ hǀ@ r ǿՁղ@ |ǿ@ ղ@ @ 됳@ @ \  P \*  *2> h큿萳@  큿@  큿萳@   @ @  @  @ @  (@ 2@ < @  F @ P @ Z ꀻ @  d @ n  @ x낻 @  뀻 @  @ " @   @ @  @   @   @  @  @    *@  4 @ >@ H @  R \@  f @ p@ z @    @ Calculate and return the starting X coordinate of the current die.@ P @ d XLd\0 (    @ P@  Z @ d@  n@ x @ 򷳎@  @   @  @  @  @   @ Ȁ @ ҹ@ ܱ@  涎@$   SUB Toggle(INTEGER Die)@B$ 7 Change the sig Z   @  @ @    @   @  뀻 @ Ҁ  @ ܹ@   @  he@  @  he@  @ @ " he@  ,@ 6@ Z  @   @  @ 뀻 @   @ Զ@ ޶ SUB Cursor@>趎3 Draw a graphical "cursor" under the current die,@<>1 Erasing it from under the old current, if any.@L<A Set Olddie (calle  :!0FNStartxDieBasesXYWH DimensionsPad@ @ ! @ !  @ @  Ľ@  ζ@2  ض& SUB Draw_cursor(INTEGER X,OPTIONAL P)@B2 n of the given die in the Dice() array.@DB 8 If the die's value was positive, erase the die's image@>D 2 If the die's value was negative, draw the image.@ > @ " H    @@ J he@  T@ ^@ h@ r@ | he@  @ @ @ @ @  he@  @ @ @ @ @ @  Jd "Old" here) to Currdie (called "New" here.)@ L @  R H"ubrNewOld   CursorCurrNewOld Draw_  ⶎ6 Draw the graphical cursor at the given X coordinate.@HB 춎= If optional "P" parameter is given, change the PEN to that.@"H  Otherwise, set PEN 1@ " @ @>   X  &( 2  = ToggleDieBasesHisxYDiceDiceXFNStartxOnedieK@ , @ 6! @ @@  J!@ Tղ 7 [=  @ @ 񷐳 @ B @ ĸB@  @ B@  @ B @  @  @  @ ٞ@  @ (@& 2 YATZ16 Scorecard@& < %(0<@L R ^hptx| Q"#0 & ccore ScoredispScore$ Score ScorecardMode ScorecardScore ScoredispScore$ Score_name$Crt Clear_crt$Home$ Underline$Inverse$Blink$Ui$Ub$Bi$Ubi$ Enhance_off$Bonus$Upper$Lower @  B @ Ƹ B@ B@ 萳@ 与賎@ 萳@ @ ǿ@ B@ ǿ @ B @ * @ 4 @ >@ H@ R JB$ F  1X,18A,10A,4X,18A,10A$ P  31X,18A,10A" Z!  1X,18A,8A,4X,18A,8A@" dX,18A,@  nǣǣǣǤ@ xǣ@  ! ǣ! Ǥ@ BBonus@ B@0 !B Upper 00sdot ScorecardScore ccoredispccore$ Scgre_name$ FNSelect_slot ScorecardScore ScoredispScore$ Score_name$Crt Clear_crt$Home$ Underline$Inverse$Blink$Ui$Ub$Bi$Ubi$ -g$Total$Pad$MenuFinalIUpperLowerJBonusTotalFmt1Fmt2Fmt3Fmt1Fmt2Fmt3Fmt4Fmt4@ @ ¼@" ̼D D @J" ּ@ @ @ @ @ @@@@@ (!?@ \!#@  f萳@ p@ z萳@  萳@ @ B@  @ B @  @  @ ʸ@ B**&@ ޹@ **@ B @ TotalB Lower Total0 % X,18A,10A@ %B Grand Total@ @ @  һ@ ܀!Z@ 抵?@  B GAME OVER@ @@ @  FNSelect_slot@J"> Choose 3d Enhance_off$EligibleK$IJLineColEEptrMaxeCheckkeyCheckkeySpinSpinFNMaxFNMin @ T @ ^@" hD D @J" r@@ @ @ @ @ @@@ u@&J @ @ @ @ @@& ǵOnes@ ǵTwos@ ǵThrees@ ǵFours@ ǵFives@ ǵSixes@  &ǵThree of a Kind@ 0ǵFour of a Kind@ :ǵ Full House  B@  @ B@  @ $B @ . @  8@ B@ L񷐳 @ VB @ `B@  j@ tB@ ~ @ B @  @  <a "slot" in the scorecard to fill with a score. Skip@JJ,> slots in the selection meny that already have a value. YATZ@DJ69 is an exception. Allow a new score to go in that slot.@ D@@J @@J | @@ !!!!!!!@  @ ! !!@ ǁ!@  @ 萳@ ¸萳@ ! ǀ@ǵ! @ 萳@ 깳@ @  @  @  yB N T `jrvz~0 0 0 6@ Dǵ"Small Straight@  N! ǵ"Large Straight@ X! ǵ"YATC!!@ b! ǵ"Chance??@ l!! modes@  v@ @* ! We were given a mode@ * @ @ ! @ ǁ񎷶 7 [= B>>@* Rղ@  \BE>@ f@ p@ z賎@ @"  FNScore(INTEGER Slot)@R"G Score the current roll. Enforce YATZ rules. Allow zeroing of a score@TRI only on yreDiceDice This_score FrequencyISumallSumall Got_minimumGot_3Got_2Streak High_streakFNMaxYesTargetFullk@ @  @ @ @ !%@ $! ǁ and  9 == full house@ :  @  ! !@ ! @ ǃ! @ ǂ! @ Ҵ!@  !@ !@ !@  @ @   @$ !  @>$ -h@1ܵ?$@ @ @ @   @ ƻ?! h th@6 ж * z13 == Chance@ 6  @$ 䶎  That's all for this one@0$ " Caller ensures input is in range.@ 0  @6 ce. Allow a positive score to be entered into a slot only once,@RTF Except for YATZ, which can be entered as many times as it comes up,@RRF unless it is zeroed first. If and of these conditions are violated,@RRG BEEP and return @ .1n?$@  8@ B@ L! ǀ$@ V1p?$@  `@ j@  t@ ~ @8  , Vscore calculations@ 8  @  @   @   " 3 10 == small straight@>> , 3 11 == large straight@> 6!!@  @@ J@ T @ ^! @ hǷ!@ r萳@ |萳@ղ@  i  + Apply Score@6  ! @  @  @ *! ǁ ! ǀ@ 4! ǵ! 萳@ >@B H 7 B^BE@@ H  @  @  $@ @  @ @  @ * @* 4 BVB<>@* >Ӂղ@* HB^ q$*6@ B0 JR ^ djr~cgreDicedice Thisgscore FrequencyI0FNScoreSlot ScorecardSco  @<<  0 8 == 4 of a kind@ <  @ ( @ 2 !@ < @ F @ P @ Z @ d@ n@  x 쐳@  @ ꉻ @:  /  0! @ :!@ D!@ N@ X!2@ b!2@  l@8 v- Can't zero Yatz unless it hasn't scored yet.@H8< Couldn't catch this before because we could have had Yatz..@H ! ǁn't 7 [= 1 nB \@ B@  @ @@vnD0!!0FNMinAB .@ B@  @ ڽ@  @  f@ p !@ z ǀ!@  @  @  ղ@  @  @ @  @   @ Բ@ @ 7200 OPTION BASE 1 7210 COM /Bases/ INTEGER X,Y (7220 J@ p! @ zǁ @  @6  + Main exit point@6  + @  @  @  @ @  ʶ   :@  @  @  ǀ@  @J j !@ t! @ ~! @ @ !  @  @ 1!K@  1@ 1@ 1@  1@ 1@ 1@  K !@  ! ! !@  萳@   萳@  @  @ KE@  @   @ @ @ "X@ , ꐳ@ 6@ @@ J @  FNRoll_dice@>3 For each die in the Dice() array, if the current@D>8 value is negative, replace it with a new random value@DD 9 between 1 and 6. Set Currdie to 1 and draw the cursor.@ 1@  1@ 2@  @ @ ! @  (@ 2@ <@ F!X@ Pٞ@  Zٞ#SCRATCH KEYX@ d"@ n@ x @ @ N @  T @ ^@ h@ r@ |׳  @  @  @ @  @   @ ́@ @   @  @ @  @  @ &@ 0  0changes were made, 0 otherwise@ ^vp &* 0 8 @ FLNV wBFJP ^ dntvx~e$ Underline$Inverse$Blink Init_gameCrt Clear_crt$Home$ U J  & * 0 : > BD0LT0^Z`0hp0v|0j z:@  D @ N B Enter Score@  X b @  l @ v BROLL @  @ @@vn0!!0FNMaxA ^adCurrCubrdieOlddaeDice FNRoll_diceBasesXYWH DimensionsPadCurrCurrdieOlddieDiceDiceIChangedOnedieCursorm@ * @ 4 ! @ > !  @ H  ! @ R @ \ !! nderline$Inverse$Blink$Ui$Ub$Bi$Ubi$ Enhance_off$LableOldphaseBasesXYCurrCurrdieOlddieDiceDice DimensionsWHPad ScorecardScore R@ V @J `@@@@@@@ @ @ @ 0*leOldphas LablePhaseBasesXYWH DimensionsPadLableOldphaseMyxMyyNUnscoreUnscoreRollRollUnrollUnrollScoreScoreRrrRrrSssSss B@  @ ! @ !  @  7 [= obtain a copy of the license at@60 ! the following URL: http://retrocalculator.com/GPLV2.txt?70 ! The author may be contacted via email to hbo@egbok.comt80 OPTION BASE 1 90 Init_gameS100 INTEGER IS110 COM /Bases/ INTEGER X,Yn'0 GRAPHICS ON 390 Spin: GOTO SpinO400 Toggle: !410 CALL Toggle(Currdie)420 GOTO Spinl 430 Roll: !440 Roll=Roll+1(#450 IF FNRoll_dice THEN ScoreO460 Lable(Roll)i470 IF Roll=3 THEN Score480  IRet=FNScore(Slot)t810  IF NOT Ret THEN 820 BEEP R830  Slot=0-ABS(Slot)840 P END IF850 END WHILE0,860 IF Ret=1 THEN ! Score isn't final870  ScorecardE880  Final=0r890 ELSE90 GER Corner ! Flag whether to draw corners(1130 COM /Dimensions/ INTEGER W,H,Pad1140 Ch=H/21150 Cw=W/21160 IF H>10 THEN n1170 Qw=W/4-11180 Qh=H/41190 Tqw=W*3/4N1200 Tqh=H*3/4+1n1210 Corner=1 1220 EL120 COM /Curr/ INTEGER Currdie,Olddiea130 COM /Dice/ Dice(1:5)&140 COM /Dimensions/ INTEGER W,H,Pad150 COM /Scorecard/ Score(13)W160 INTEGER Final,Quit,Roll3 170 Roll=1180 REPEAT ! UNTIL Quit190 FOR I=1 TO 13 200 ScorSGOTO Spin 490 Checkkey: !500 K$=KBD$i510 IF K$[1]=" " THEN 520  Toggle(Currdie) 530 R GOTO Spinr540 END IF550 SELECT K$[2]560 CASE "<","V"&570 - Currdie=FNMax(1,Currdie-1)580 CASE " )0  Scorecard(1)910 Final=1r920 END IF930 UNTIL Finalr940 Quit=1950 UNTIL Quit 960 Quit: ! 970 DISP "Done!" 980 ENDP990 !:1000 ! **+* Main Program End1010 !/1020 ! SUB OneSE1230 Qw=DROUND(W/5,1)1240 Qh=DROUND(H/5,1)+11250 Tqw=DROUND(W*5/8,1)G1260 Tqh=DROUND(H*5/8,1)+1R1270 Corner=01280 END IF1290 IF (NPAR=2) THEN 81300 PEN -1 1310 ELSE1320 PEN 111330 END IFe(I)=-1 210 NEXT I$220 REPEAT ! UNTIL Final (Score)230 FOR I=1 TO 5240 Dice(I)=-1250 NEXT I260 Olddie=0270 GINITe280 GRAPHICS OFF290 ScorecardO300 RANDOMIZE 310 Dont_care= >","^"&590 4 Currdie=FNMin(5,Currdie+1)600 CASE "E"610 & GOTO RollN620 CASE ELSEl630 BEEP S640 J GOTO SpinN650 END SELECT!660 IF Olddie=Currdie THEN i670 BEEP i680 GOTO Spi |die(INTEGER Spots,OPTIONAL Erase)P;1030 ! Draw or erase the image of one die with rank given.;1040 ! 'Spots'. If optional param Erase is present, erase.:1050 ! the image by setting PEN -1.Otherwise, set PEN 1.;1060 ! This SUB relies on the callH1340 IF Corner THEN N1350 IMOVE 0,2H1360 IDRAW 2,-21370 IDRAW W-4,0N1380 IDRAW 2,2,1390 IDRAW 0,H-4N1400 IDRAW -2,21410 IDRAW -(W-4),01420 IDRAW -2,-2)1430 IDRAW 0,-(H-4)1440 IMOVE 10 ! YATZ 9816 v 1.0*20 ! Copyright (C) 2005 by Howard OwenA30 ! Released under the GNU General Public License, version 2I40 ! A copy of the GPL in LIF format is on the disk image distributedH50 ! with this program. You can alsoFNRoll_dicec320 Lable(Roll)N0330 ON KEY 5 LABEL "Sel/Desel" GOTO Toggle)340 ON KEY 6 LABEL "Roll" GOTO Roll +350 ON KEY 7 LABEL "Score" GOTO Scoreo)360 ON KEY 8 LABEL "Quit" GOTO Quitr370 ON KBD GOTO Checkkey38nu690 END IF700 Cursor710 GOTO Spini720 Score: !730 Roll=1740 Lable(4)750 INTEGER Slot,Ret760 Slot=-1 770 WHILE Slot<0780  Scorecard0790  Slot=FNSelect_slot800   ing context to position.51070 ! the graphics cursor to the appropriate places1080 !.1090 SUB Onedie(INTEGER Spots,OPTIONAL Erase)1100 OPTION BASE 1GP1110 INTEGER Cw,Ch,Qw,Qh,Tqw,Tqh ! Half, quarte and three-quarter dimensions61120 INTE7 [=# DU2510 !N-2520 ! SUB Draw_cursor(INTEGER X,OPTIONAL P) =2530 ! Draw the graphical cursor at the given X coordinate.hD2540 ! If optional "P" parameter is given, change the PEN to that.2550 ! Otherwise, set PEN 1m2560 ! +2570 SUB Draw_curcON BASE 1G"2870 COM /Bases/ INTEGER Hisx,Y2880 COM /Dice/ Dice(*)2890 INTEGER X/2900 X=FNStartx(Die)(2910 MOVE X,Y2920 IF Dice(Die)>0 THEN "2930 Onedie(INT(Dice(Die)),1) 2940 ELSE2950 Onedie(-Dice(Die))2960 Lowright1790 CASE ELSEo1800 BEEP S/1810 DISP "Die value out of range: ";Spotsc1820 END SELECT1830 GOTO ExitT1840 Center: !1850 IMOVE Cw-1,Cha1860 GOSUB Spot1870 IMOVE -(Cw-1),-Ch 1880 RETURN (1890 Upright2280 ! Draw a graphical "cursor" under the current die,82290 ! Erasing it from under the old current, if any.H2300 ! Set Olddie (called "Old" here) to Currdie (called "New" here.)2310 ! 2320 SUB Cursor2330 OPTION BASE 1("2340 COM  sor(INTEGER X,OPTIONAL P),2580 OPTION BASE 1("2590 COM /Bases/ INTEGER Hisx,Y(2600 COM /Dimensions/ INTEGER W,H,Pad2610 INTEGER Mypi2620 IF NPAR=2 THEN /2630 Myp=P= 2640 ELSE2650 Myp=1=2660 END IF2670 MOVE END IF2970 Dice(Die)=-Dice(Die) 2980 SUBEND*2990 SUB Scorecard(OPTIONAL INTEGER Mode)3000 OPTION BASE 1P 3010 COM /Scorecard/ Score(*):3020 COM /Scoredisp/ Score$(13)[10],Score_name$(13)[15]y3030 COM /Crt/ Clear_crt$[2],Home$[2]6-0,-2- 1450 ELSE1460 IDRAW W,0-1470 IDRAW 0,H-1480 IDRAW -W,01490 IDRAW 0,-H1500 END IF1510 SELECT Spots1520 CASE 11530 GOSUB Center1540 CASE 21550 GOSUB Upright)1560 GOSUB Lowleft)}: !(1900 IMOVE Tqw,Tqh,1910 GOSUB Spot1920 IMOVE -Tqw,-TqhC1930 RETURN T1940 Lowleft: !T1950 IMOVE Qw,Qh-1960 GOSUB Spot1970 IMOVE -Qw,-Qhq1980 RETURN Q1990 Upleft: !2000 IMOVE Qw,Tqh2010 GOSUB Spot20%/Curr/ INTEGER New,Old2350 IF (Old) THEN '2360 Draw_cursor(FNStartx(Old),-1))2370 END IF"2380 Draw_cursor(FNStartx(New))-2390 Old=New ! NB:Changing Olddie/Currdieu 2400 SUBEND2410 !2420 ! FNStartx(INTEGER Die)L2430 !   X,Y2680 PEN MypY2690 IF W>9 THEN 2700 IDRAW 0,-12710 IDRAW W,012720 IDRAW 0,11 2730 ELSE2740 IMOVE 0,-12750 IDRAW W,012760 IMOVE 0,112770 END IF 2780 SUBEND2790 ! 2800 ! SUB Toggle(INTEa1570 CASE 31580 GOSUB Center1590 GOSUB Upright)1600 GOSUB Lowleft)1610 CASE 41620 GOSUB Upleft1630 GOSUB Upright)1640 GOSUB Lowleft)1650 GOSUB Lowright1660 CASE 51670 GOSUB Upleft1680 20 IMOVE -Qw,-Tqh2030 RETURN Q2040 Lowright: !2050 IMOVE Tqw,Qh2060 GOSUB Spot2070 IMOVE -Tqw,-Qh2080 RETURN T2090 Midleft: !T2100 IMOVE Qw,Ch-2110 GOSUB Spot2120 IMOVE -Qw,-Chh2130 RETURN Q2140 Midrigh Calculate and return the starting X coordinate of the current die.2440 !2450 DEF FNStartx(INTEGER Die)t2460 OPTION BASE 1T2470 COM /Bases/ INTEGER X,Yt(2480 COM /Dimensions/ INTEGER W,H,Pad 2490 RETURN X+(W+Pad)*(Die-1) 2500 FNEN GER Die)?2810 ! Change the sign of the given die in the Dice() array.t@2820 ! If the die's value was positive, erase the die's image:2830 ! If the die's value was negative, draw the image.2840 !2850 SUB Toggle(INTEGER Die)w2860 OPTI[ GOSUB Uprightt1690 GOSUB Center1700 GOSUB Lowleftt1710 GOSUB Lowright1720 CASE 61730 GOSUB Upleft1740 GOSUB Midleftt1750 GOSUB Lowleftt1760 GOSUB Uprightt1770 GOSUB Midright1780 GOSUB ft: !2150 IMOVE Tqw,Ch2160 GOSUB Spot2170 IMOVE -Tqw,-Ch2180 RETURN T 2190 Spot: !N2200 IDRAW 0,-12210 IDRAW 1,012220 IDRAW 0,112230 IDRAW -1,02240 RETURN 12250 Exit:SUBEND2260 !i2270 ! SUB Cursor:7 [=,Underline$[1],Inverse$[1],Blink$[1],Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1]?3040 DIM Bonus$[10],Upper$[10],Lower$[10],Total$[10],Pad$[8][3050 Score_name$(1)="Ones"[3060 Score_name$(2)="Twos"[3070 Score_name$(3)="Threes"03080 '20 END IF$3330 Score$(I)=VAL$(Score(I))3340 Pad$=""I'3350 "FOR J=1 TO 8-LEN(Score$(I)) 3360 Pad$=Pad$&" "N3370 NEXT J<3380 JScore$(I)=Underline$&Pad$&Score$(I)&Enhance_off$3390 END IF3400 M(3710 FOR J=1 TO 8-LEN(Lower$)3720 |Pad$=Pad$&" "N3730 NEXT J3740 Lower$=Pad$&Lower$3750 END IF3760 IF Bonus=0 THEN 3770 Bonus$=" L"$ 3780 ELSE3790 Bonus$=VAL$(Bonus)3800 Pad$=""V"3810  $,4030 ! 4040 IF Final THEN 4050 GCLEAR4060 MOVE 0,90E4070 CSIZE 10,.5 4080 LABEL "GAME OVER"r4090 END IF 4100 SUBEND4110 !4120 ! FNSelect_slotF4130 ! Choose a "slot" in the scorecard to fill with a seScore_name$(4)="Fours"3090 Score_name$(5)="Fives"3100 Score_name$(6)="Sixes"(3110 Score_name$(7)="Three of a Kind"'3120 Score_name$(8)="Four of a Kind""#3130 Score_name$(9)="Full House"i(3140 Score_name$(10)="Small Straight"(3150 NEXT I3410 IF Upper>=63 THEN 3420 Bonus=353430 Upper=Upper+Bonusl3440 END IF3450 IF Final THEN 3460 Total=Lower+Upperl3470 Total$=VAL$(Total)3480 Pad$=""V"3490 FOR J=1 TO 8-LEN(Total$)3500   FOR J=1 TO 8-LEN(Bonus$)3820 Pad$=Pad$&" "N3830 NEXT J3840 Bonus$=Pad$&Bonus$3850 END IF3860 OUTPUT 2;Clear_crt$;3870 PRINT Enhance_off$3880 PRINT TABXY(1,5)=3890 PRINT TAB(2);Inverse$&"YATZ16 Scorecard"&Enh core. SkipF4140 ! slots in the selection meny that already have a value. YATZA4150 ! is an exception. Allow a new score to go in that slot. 4160 !4170 DEF FNSelect_sloti4180 OPTION BASE 1o 4190 COM /Scorecard/ Score(*):4200 CO Score_name$(11)="Large Straight" 3160 Score_name$(12)="YATC!!""3170 Score_name$(13)="Chance??"#3180 INTEGER Menu,Final ! modesi3190 Menu=03200 Final=0 .3210 IF NPAR=1 THEN ! We were given a mode3220 Final=1 3230 .tPad$=Pad$&" "N3510 NEXT J03520 Total$=Blink$&Pad$&Total$&Enhance_off$ 3530 ELSE3540 Total$="**@"$3550 END IF3560 IF Upper=0 THEN 3570 Upper$=" <"$ 3580 ELSE3590 Upper$=VAL$(Upper)3600 Pa Gance_off$83900 PRINT ""%3910 Fmt1:IMAGE 1X,18A,10A,4X,18A,10A 3920 Fmt2:IMAGE 31X,18A,10A4#3930 Fmt3:IMAGE 1X,18A,8A,4X,18A,8A03940 FOR I=1 TO 6P3950 PRINT USING Fmt1;Score_name$(I),Score$(I),Score_name$(I+6),Score$(I+6)3960 NEXT IM /Scoredisp/ Score$(13)[10],Score_name$(13)[15]y4210 COM /Crt/ Clear_crt$[2],Home$[2],Underline$[1],Inverse$[1],Blink$[1],Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1]4220 DIM Eligible(13),K$[2](4230 INTEGER I,J,Line,Col,E,Eptr,Maxe 4240 DEND IF3240 FOR I=1 TO 13N3250 IF Score(I)=-1 THEN 83260 Score$(I)=Underline$&" $"&Enhance_off$3270 ELSE3280 IF I<7 THEN "3290 Upper=Upper+Score(I)3300 ELSE"3310 Lower=Lower+Score(I)330d$=""V"3610 FOR J=1 TO 8-LEN(Upper$)3620 |Pad$=Pad$&" "N3630 NEXT J3640 Upper$=Pad$&Upper$3650 END IF3660 IF Lower=0 THEN 3670 Lower$=" D"$ 3680 ELSE3690 Lower$=VAL$(Lower)3700 Pad$=""V" M33970 PRINT USING Fmt2;Score_name$(13),Score$(13),'3980 PRINT USING Fmt1;"Bonus",Bonus$)3990 PRINT ""B4000 PRINT USING Fmt3;"Upper Total",Upper$,"Lower Total",Lower$4010 Fmt4:IMAGE X,18A,10A"-4020 PRINT USING Fmt4;"Grand Total",Total-BJ=1E4250 FOR I=1 TO 13i4260 IF Score(I)=-1 THEN 4270 Eligible(J)=IT4280 J=J+1b4290 ELSE)4300 $IF I=12 AND Score(I)<>0 THEN U4310 Eligible(J)=124320 J=J+1b4330 END IF4340 END 7 [=Z 3:IF5100 NEXT I 5110 !E5120 CASE 7,8=5130 ! 7 == 3 of a kind =5140 ! /8 == 4 of a kind 5150 GOSUB Sumall 5160 &!U5170 INTEGER Got_minimum 51 large straight$5430 INTEGER Streak,High_streak5440 Streak=05450 High_streak=0k5460 GOSUB Sumall5470 FOR I=1 TO 6!5480 IF Frequency(I) THEN e5490 Streak=Streak+1H5500 ELSE35510 High_str 8 SELECT K$[2]"4570 CASE "<","V",">","^","E"4580 $OFF KBD"4590 CASE ELSE"4600 BEEP S4610 GOTO Spin"4620 END SELECT 4630 PRINT TABXY(Col,Line);,4640 PRINT Enhance_off$&Score_name$(E);4650 SELE? 1 and 13.4830 !4840 DEF FNScore(INTEGER Slot) 4850 !4860 OPTION BASE 1E 4870 COM /Scorecard/ Score(*)4880 COM /Dice/ Dice(*))4890 INTEGER This_score,Frequency(1:6) -4900 IF Slot<>12 AND Score(Slot)<>-1 THEN r4910 BE 480 Got_minimum=0i5190 FOR I=1 TO 5/5200 *IF Frequency(Dice(I))>=Slot-4 THEN =5210 Got_minimum=1c5220 LEND IF5230 NEXT I+5240 This_score=This_score*Got_minimumH 5250 !s5260 CASE 9<5270 $eak=FNMax(Streak,High_streak)a5520 Streak=05530 lEND IF5540 NEXT I*5550 Streak=FNMax(Streak,High_streak) 5560 IF Slot-Streak<9 THEN "5570 ,This_score=(Slot-7)*105580 ELSE5590 This_score=05600 &CT K$[2]4660 CASE "V","<" 4670 2Eptr=FNMax(1,Eptr-1)4680 CASE "^",">"#4690 2Eptr=FNMin(Maxe,Eptr+1)n4700 CASE "E"4710 ^RETURN E4720 END SELECT4730 END WHILEE 4740 FNEND 4750 ! FNScore(INTEGER SloTEP 110,.5N4920 RETURN 04930 END IF*4940 IF Slot=12 AND Score(Slot)=0 THEN 4950 BEEP 880,.5D4960 RETURN 04970 END IF4980 This_score=0 4990 !s75000 ! score calculationse 5010  ! e9 == full house5280 GOSUB Sumall5290 INTEGER Got_3,Got_2 5300 FOR I=1 TO 6*5310 $IF Frequency(I)=3 THEN Got_3=1*5320 FIF Frequency(I)=2 THEN Got_2=15330 NEXT I"5340 IF Got_2 A END IF 5610 ! 5620 CASE 12F65630 ! 12 == yatz! 5640 j! 5650 INTEGER Target,Yes5660 Target=Dice(1)5670 Yes=1t5680 FOR I=2 TO 5)5690 IF Dice(I)<>Target THEN Yes=IF4350 NEXT I4360 Eptr=14370 Maxe=J-14380 WHILE 114390 E=Eligible(Eptr)4400 IF E<7 THEN 4410 Line=7+E4420 Col=274430 ELSE4440 Line=E+14450 (Col=324460 END IF 4470 PRIN_t)O4760 ! Score the current roll. Enforce YATZ rules. Allow zeroing of a score$Q4770 ! only once. Allow a positive score to be entered into a slot only once,1N4780 ! Except for YATZ, which can be entered as many times as it comes up,N4790 y>! 5020 SELECT Slot 5030 !E5040 CASE <7SN5050 ! O Upper half. Sum dice that match the current slot5060 FOR I=1 TO 5!5070 IF Dice(I)=Slot THEN e(5080 This_score=This_score+Slot5090 END  ND Got_3 THEN 5350 $This_score=25t5360 ELSE5370 $This_score=05380 END IF 5390 ! 5400 CASE 10,11@5410 !  10 == small straight@5420 !  11 == *T TABXY(Col,Line);54480 PRINT Inverse$&Score_name$(E)&Enhance_off$;]4490 ON KBD GOTO Checkkey4500 Spin:GOTO SpinT4510 Checkkey:K$=KBD$ 4520 IF LEN(K$)<>2 THEN y4530 BEEP K4540 &GOTO Spin>4550 END IF4560 a ! unless it is zeroed first. If and of these conditions are violated,O4800 ! BEEP and return 0. Detect when a score card is full, and return 2 ifeO4810 ! so. Otherwise return 1. Caller is responsible to ensure that Slot ise4820 ! between7 [=WTHEN Score(12)=0(5940 Score(12)=Score(12)+This_score5950 END IFB5960 ! check for filled score card 5970 ! 5980 INTEGER Full5990 Full=16000 FOR I=1 TO 13 $6010 IF Score(I)=-1 THEN Full=0e(1:5)(6290 COM /Dimensions/ INTEGER W,H,Pad!6300 COM /Scorecard/ Score(13)W%6310 Clear_crt$=CHR$(255)&CHR$(75)P6320 Enhance_off$=CHR$(128)6330 Inverse$=CHR$(129)6340 Blink$=CHR$(130)6350 Bi$=CHR$(131)36360 Underline$=C +6690 CASE 2,36700 Oldphase=Phase-16710 GOSUB Unroll6720 GOSUB Roll6730 CASE 46740 Oldphase=36750 GOSUB Unroll6760 GOSUB Scorel6770 END SELECT6780 SUBEXITE 6790 Roll: ! 6800 PEN 1I6810 N=]gative, replace it with a new random valueA7180 ! between 1 and 6. Set Currdie to 1 and draw the cursor.]87190 ! Return 1 if no changes were made, 0 otherwise7200 DEF FNRoll_dicef7210 OPTION BASE 1f7220 COM /Bases/ INTEGER X,Ye(7230220 5700 NEXT I5710 IF Yes THEN 5720 $This_score=50a5730 ELSE5740 This_score=0<5750 4! Can't zero Yatz unless it hasn't scored yet.K5760 @! Couldn't catch this before because we could have had Yatz..l"P6020 NEXT I66030 ! Main exit point6040 IF Full THEN 6050 RETURN 2 6060 ELSE6070 RETURN 16080 END IF 6090 ! 6100 Sumall: !:6110 This_score=06120 FOR I=1 TO 66130 FrjHR$(132)6370 Ui$=CHR$(133)R6380 Ub$=CHR$(134)R6390 Ubi$=CHR$(135)6400 PRINTER IS 16410 CONTROL 2,1;0)6420 CONTROL 1,4;0) 6430 W=11 6440 H=W1 6450 Pad=2O 6460 X=0= 6470 Y=886480 OUTPUT 2;Clear_crt$;"64 PhaseE6820 GOSUB RrrT6830 RETURN r6840 Unroll: !6850 N=Oldphase6860 PEN -16870 GOSUB Rrre6880 RETURN r 6890 Score: !N 6900 PEN 1N6910 GOSUB Ssse6920 RETURN s6930 Unscore: !s6940 PEN -16950 GOSUB Ss45770 IF Score(12)<>-1 THEN 5780 BEEP 220,.1>5790 RETURN 05800 END IF5810 END IF 5820 ! 5830 CASE 13F75840 ! +13 == Chanceo5850 GOSUB Sumall%5860 ! equency(I)=06140 NEXT I6150 FOR I=1 TO 5'6160 This_score=This_score+Dice(I)M16170 Frequency(Dice(I))=Frequency(Dice(I))+1p6180 NEXT I6190 RETURN e 6200 FNENDU6210 !6220 SUB Init_game(6230 OPTION BASE 1iy6240  @90 OUTPUT 2;"#SCRATCH KEYX" 6500 GINITT6510 GCLEAR6520 Oldphase=0 6530 SUBEND6540 SUB Lable(INTEGER Phase)6550 OPTION BASE 1E6560 COM /Bases/ INTEGER X,Y(6570 COM /Dimensions/ INTEGER W,H,Pad$6580 COM /Lable/ INTE pse6960 RETURN s6970 Sss: !6980 MOVE Myx,Myy6990 LABEL "Enter Score"G7000 RETURN E 7010 Rrr: !N7020 MOVE Myx,Myy7030 LABEL "ROLL "&VAL$(N)S7040 RETURN R 7050 SUBEND7060 DEF FNMax(INTEGER A,B)7070 IF A>B.mThat's all for this one 85870 END SELECT ! Caller ensures input is in range. 5880 ! 65890 ! sApply Score5900 IF Slot<>12 THEN 5910 Score(Slot)=This_score 5920 ELSE*5930 IF Score(12)=-1  COM /Crt/ Clear_crt$[2],Home$[2],Underline$[1],Inverse$[1],Blink$[1],Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1]$6250 COM /Lable/ INTEGER Oldphase6260 COM /Bases/ INTEGER X,Yp)6270 COM /Curr/ INTEGER Currdie,OlddieU6280 COM /Dice/ Dic GER Oldphase6590 INTEGER Myx,Myy,NE6600 Myx=5*(W+Pad)+2*Pad 6610 Myy=Y+4W6620 MOVE Myx,Y+10+6630 SELECT Phase6640 CASE 1(6650 IF Oldphase THEN GOSUB Unscore6660 Oldphase=16670 GOSUB Roll6680 PEN 1   THEN RETURN A7080 RETURN B 7090 FNENDU7100 DEF FNMin(INTEGER A,B)7110 IF A10 THEN n1170 Qw=W/4-11180 Qh=H/41190 Tqw=W*3/4N1200 Tqh=H*3/4+1n1210 Corner=1 1220 ELMOVE (W+Pad)*(I-1),Y7320 Onedie(Currdie)-7330 Changed=1r7340 Dice(I)=Currdie-7350 END IF7360 NEXT I7370 Currdie=1I7380 Cursor7390 RETURN NOT Changed 7400 FNENDU Currdie=INT(RND*6+1) 7310 SGOTO Spin 490 Checkkey: !500 K$=KBD$i510 IF K$[1]=" " THEN 520  Toggle(Currdie) 530 R GOTO Spinr540 END IF550 SELECT K$[2]560 CASE "<","V"&570 - Currdie=FNMax(1,Currdie-1)580 CASE " )0  Scorecard(1)910 Final=1r920 END IF930 UNTIL Finalr940 Quit=1950 UNTIL Quit 960 Quit: ! 970 DISP "Done!" 980 ENDP990 !:1000 ! **+* Main Program End1010 !/1020 ! SUB One SE1230 Qw=DROUND(W/5,1)1240 Qh=DROUND(H/5,1)+11250 Tqw=DROUND(W*5/8,1)G1260 Tqh=DROUND(H*5/8,1)+1R1270 Corner=01280 END IF1290 IF (NPAR=2) THEN 81300 PEN -1 1310 ELSE1320 PEN 111330 END IFe(I)=-1 210 NEXT I$220 REPEAT ! UNTIL Final (Score)230 FOR I=1 TO 5240 Dice(I)=-1250 NEXT I260 Olddie=0270 GINITe280 GRAPHICS OFF290 ScorecardO300 RANDOMIZE 310 Dont_care= >","^"&590 4 Currdie=FNMin(5,Currdie+1)600 CASE "E"610 & GOTO RollN620 CASE ELSEl630 BEEP S640 J GOTO SpinN650 END SELECT!660 IF Olddie=Currdie THEN i670 BEEP i680 GOTO Spi |die(INTEGER Spots,OPTIONAL Erase)P;1030 ! Draw or erase the image of one die with rank given.;1040 ! 'Spots'. If optional param Erase is present, erase.:1050 ! the image by setting PEN -1.Otherwise, set PEN 1.;1060 ! This SUB relies on the callH1340 IF Corner THEN N1350 IMOVE 0,2H1360 IDRAW 2,-21370 IDRAW W-4,0N1380 IDRAW 2,2,1390 IDRAW 0,H-4N1400 IDRAW -2,21410 IDRAW -(W-4),01420 IDRAW -2,-2)1430 IDRAW 0,-(H-4)1440 IMOVE FNRoll_dicec320 Lable(Roll)N0330 ON KEY 5 LABEL "Sel/Desel" GOTO Toggle)340 ON KEY 6 LABEL "Roll" GOTO Roll +350 ON KEY 7 LABEL "Score" GOTO Scoreo)360 ON KEY 8 LABEL "Quit" GOTO Quitr370 ON KBD GOTO Checkkey38nu690 END IF700 Cursor710 GOTO Spini720 Score: !730 Roll=1740 Lable(4)750 INTEGER Slot,Ret760 Slot=-1 770 WHILE Slot<0780  Scorecard0790  Slot=FNSelect_slot800   ing context to position.51070 ! the graphics cursor to the appropriate places1080 !.1090 SUB Onedie(INTEGER Spots,OPTIONAL Erase)1100 OPTION BASE 1GP1110 INTEGER Cw,Ch,Qw,Qh,Tqw,Tqh ! Half, quarte and three-quarter dimensions61120 INTE6-0,-2- 1450 ELSE1460 IDRAW W,0-1470 IDRAW 0,H-1480 IDRAW -W,01490 IDRAW 0,-H1500 END IF1510 SELECT Spots1520 CASE 11530 GOSUB Center1540 CASE 21550 GOSUB Upright)1560 GOSUB Lowleft)b COM /Dimensions/ INTEGER W,H,Pad)7240 COM /Curr/ INTEGER Currdie,Olddied7250 COM /Dice/ Dice(*)7260 INTEGER I,Changed)7270 Changed=0,7280 FOR I=1 TO 57290 IF Dice(I)<0 THEN 7300 Currdie=INT(RND*6+1) 7310 0 GRAPHICS ON 390 Spin: GOTO SpinO400 Toggle: !410 CALL Toggle(Currdie)420 GOTO Spinl 430 Roll: !440 Roll=Roll+1(#450 IF FNRoll_dice THEN ScoreO460 Lable(Roll)i470 IF Roll=3 THEN Score480 7 [=Lowright1790 CASE ELSEo1800 BEEP S/1810 DISP "Die value out of range: ";Spotsc1820 END SELECT1830 GOTO ExitT1840 Center: !1850 IMOVE Cw-1,Cha1860 GOSUB Spot1870 IMOVE -(Cw-1),-Ch 1880 RETURN (1890 Upright2280 ! Draw a graphical "cursor" under the current die,82290 ! Erasing it from under the old current, if any.H2300 ! Set Olddie (called "Old" here) to Currdie (called "New" here.)2310 ! 2320 SUB Cursor2330 OPTION BASE 1("2340 COM  sor(INTEGER X,OPTIONAL P),2580 OPTION BASE 1("2590 COM /Bases/ INTEGER Hisx,Y(2600 COM /Dimensions/ INTEGER W,H,Pad2610 INTEGER Mypi2620 IF NPAR=2 THEN /2630 Myp=P= 2640 ELSE2650 Myp=1=2660 END IF2670 MOVE END IF2970 Dice(Die)=-Dice(Die) 2980 SUBEND*2990 SUB Scorecard(OPTIONAL INTEGER Mode)3000 OPTION BASE 1P 3010 COM /Scorecard/ Score(*):3020 COM /Scoredisp/ Score$(13)[10],Score_name$(13)[15]y3030 COM /Crt/ Clear_crt$[2],Home$[2]}: !(1900 IMOVE Tqw,Tqh,1910 GOSUB Spot1920 IMOVE -Tqw,-TqhC1930 RETURN T1940 Lowleft: !T1950 IMOVE Qw,Qh-1960 GOSUB Spot1970 IMOVE -Qw,-Qhq1980 RETURN Q1990 Upleft: !2000 IMOVE Qw,Tqh2010 GOSUB Spot20%/Curr/ INTEGER New,Old2350 IF (Old) THEN '2360 Draw_cursor(FNStartx(Old),-1))2370 END IF"2380 Draw_cursor(FNStartx(New))-2390 Old=New ! NB:Changing Olddie/Currdieu 2400 SUBEND2410 !2420 ! FNStartx(INTEGER Die)L2430 !   X,Y2680 PEN MypY2690 IF W>9 THEN 2700 IDRAW 0,-12710 IDRAW W,012720 IDRAW 0,11 2730 ELSE2740 IMOVE 0,-12750 IDRAW W,012760 IMOVE 0,112770 END IF 2780 SUBEND2790 ! 2800 ! SUB Toggle(INTE,Underline$[1],Inverse$[1],Blink$[1],Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1]?3040 DIM Bonus$[10],Upper$[10],Lower$[10],Total$[10],Pad$[8][3050 Score_name$(1)="Ones"[3060 Score_name$(2)="Twos"[3070 Score_name$(3)="Threes"03080 a1570 CASE 31580 GOSUB Center1590 GOSUB Upright)1600 GOSUB Lowleft)1610 CASE 41620 GOSUB Upleft1630 GOSUB Upright)1640 GOSUB Lowleft)1650 GOSUB Lowright1660 CASE 51670 GOSUB Upleft1680 20 IMOVE -Qw,-Tqh2030 RETURN Q2040 Lowright: !2050 IMOVE Tqw,Qh2060 GOSUB Spot2070 IMOVE -Tqw,-Qh2080 RETURN T2090 Midleft: !T2100 IMOVE Qw,Ch-2110 GOSUB Spot2120 IMOVE -Qw,-Chh2130 RETURN Q2140 MidrighCalculate and return the starting X coordinate of the current die.2440 !2450 DEF FNStartx(INTEGER Die)t2460 OPTION BASE 1T2470 COM /Bases/ INTEGER X,Yt(2480 COM /Dimensions/ INTEGER W,H,Pad 2490 RETURN X+(W+Pad)*(Die-1) 2500 FNEN GER Die)?2810 ! Change the sign of the given die in the Dice() array.t@2820 ! If the die's value was positive, erase the die's image:2830 ! If the die's value was negative, draw the image.2840 !2850 SUB Toggle(INTEGER Die)w2860 OPTI[ GOSUB Uprightt1690 GOSUB Center1700 GOSUB Lowleftt1710 GOSUB Lowright1720 CASE 61730 GOSUB Upleft1740 GOSUB Midleftt1750 GOSUB Lowleftt1760 GOSUB Uprightt1770 GOSUB Midright1780 GOSUB ft: !2150 IMOVE Tqw,Ch2160 GOSUB Spot2170 IMOVE -Tqw,-Ch2180 RETURN T 2190 Spot: !N2200 IDRAW 0,-12210 IDRAW 1,012220 IDRAW 0,112230 IDRAW -1,02240 RETURN 12250 Exit:SUBEND2260 !i2270 ! SUB Cursor: DU2510 !N-2520 ! SUB Draw_cursor(INTEGER X,OPTIONAL P) =2530 ! Draw the graphical cursor at the given X coordinate.hD2540 ! If optional "P" parameter is given, change the PEN to that.2550 ! Otherwise, set PEN 1m2560 ! +2570 SUB Draw_cur cON BASE 1G"2870 COM /Bases/ INTEGER Hisx,Y2880 COM /Dice/ Dice(*)2890 INTEGER X/2900 X=FNStartx(Die)(2910 MOVE X,Y2920 IF Dice(Die)>0 THEN "2930 Onedie(INT(Dice(Die)),1) 2940 ELSE2950 Onedie(-Dice(Die))2960 7 [=~ $,4030 ! 4040 IF Final THEN 4050 GCLEAR4060 MOVE 0,90E4070 CSIZE 10,.5 4080 LABEL "GAME OVER"r4090 END IF 4100 SUBEND4110 !4120 ! FNSelect_slotF4130 ! Choose a "slot" in the scorecard to fill with a sIF4350 NEXT I4360 Eptr=14370 Maxe=J-14380 WHILE 114390 E=Eligible(Eptr)4400 IF E<7 THEN 4410 Line=7+E4420 Col=274430 ELSE4440 Line=E+14450 (Col=324460 END IF 4470 PRINeScore_name$(4)="Fours"3090 Score_name$(5)="Fives"3100 Score_name$(6)="Sixes"(3110 Score_name$(7)="Three of a Kind"'3120 Score_name$(8)="Four of a Kind""#3130 Score_name$(9)="Full House"i(3140 Score_name$(10)="Small Straight"(3150 NEXT I3410 IF Upper>=63 THEN 3420 Bonus=353430 Upper=Upper+Bonusl3440 END IF3450 IF Final THEN 3460 Total=Lower+Upperl3470 Total$=VAL$(Total)3480 Pad$=""V"3490 FOR J=1 TO 8-LEN(Total$)3500  FOR J=1 TO 8-LEN(Bonus$)3820 Pad$=Pad$&" "N3830 NEXT J3840 Bonus$=Pad$&Bonus$3850 END IF3860 OUTPUT 2;Clear_crt$;3870 PRINT Enhance_off$3880 PRINT TABXY(1,5)=3890 PRINT TAB(2);Inverse$&"YATZ16 Scorecard"&Enh core. SkipF4140 ! slots in the selection meny that already have a value. YATZA4150 ! is an exception. Allow a new score to go in that slot. 4160 !4170 DEF FNSelect_sloti4180 OPTION BASE 1o 4190 COM /Scorecard/ Score(*):4200 CO Score_name$(11)="Large Straight" 3160 Score_name$(12)="YATC!!""3170 Score_name$(13)="Chance??"#3180 INTEGER Menu,Final ! modesi3190 Menu=03200 Final=0 .3210 IF NPAR=1 THEN ! We were given a mode3220 Final=1 3230 .tPad$=Pad$&" "N3510 NEXT J03520 Total$=Blink$&Pad$&Total$&Enhance_off$ 3530 ELSE3540 Total$="**@"$3550 END IF3560 IF Upper=0 THEN 3570 Upper$=" <"$ 3580 ELSE3590 Upper$=VAL$(Upper)3600 Pa Gance_off$83900 PRINT ""%3910 Fmt1:IMAGE 1X,18A,10A,4X,18A,10A 3920 Fmt2:IMAGE 31X,18A,10A4#3930 Fmt3:IMAGE 1X,18A,8A,4X,18A,8A03940 FOR I=1 TO 6P3950 PRINT USING Fmt1;Score_name$(I),Score$(I),Score_name$(I+6),Score$(I+6)3960 NEXT I M /Scoredisp/ Score$(13)[10],Score_name$(13)[15]y4210 COM /Crt/ Clear_crt$[2],Home$[2],Underline$[1],Inverse$[1],Blink$[1],Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1]4220 DIM Eligible(13),K$[2](4230 INTEGER I,J,Line,Col,E,Eptr,Maxe 4240 DEND IF3240 FOR I=1 TO 13N3250 IF Score(I)=-1 THEN 83260 Score$(I)=Underline$&" $"&Enhance_off$3270 ELSE3280 IF I<7 THEN "3290 Upper=Upper+Score(I)3300 ELSE"3310 Lower=Lower+Score(I)330d$=""V"3610 FOR J=1 TO 8-LEN(Upper$)3620 |Pad$=Pad$&" "N3630 NEXT J3640 Upper$=Pad$&Upper$3650 END IF3660 IF Lower=0 THEN 3670 Lower$=" D"$ 3680 ELSE3690 Lower$=VAL$(Lower)3700 Pad$=""V" M33970 PRINT USING Fmt2;Score_name$(13),Score$(13),'3980 PRINT USING Fmt1;"Bonus",Bonus$)3990 PRINT ""B4000 PRINT USING Fmt3;"Upper Total",Upper$,"Lower Total",Lower$4010 Fmt4:IMAGE X,18A,10A"-4020 PRINT USING Fmt4;"Grand Total",Total-BJ=1E4250 FOR I=1 TO 13i4260 IF Score(I)=-1 THEN 4270 Eligible(J)=IT4280 J=J+1b4290 ELSE)4300 $IF I=12 AND Score(I)<>0 THEN U4310 Eligible(J)=124320 J=J+1b4330 END IF4340 END '20 END IF$3330 Score$(I)=VAL$(Score(I))3340 Pad$=""I'3350 "FOR J=1 TO 8-LEN(Score$(I)) 3360 Pad$=Pad$&" "N3370 NEXT J<3380 JScore$(I)=Underline$&Pad$&Score$(I)&Enhance_off$3390 END IF3400 M(3710 FOR J=1 TO 8-LEN(Lower$)3720 |Pad$=Pad$&" "N3730 NEXT J3740 Lower$=Pad$&Lower$3750 END IF3760 IF Bonus=0 THEN 3770 Bonus$=" L"$ 3780 ELSE3790 Bonus$=VAL$(Bonus)3800 Pad$=""V"3810 7 [= 8 SELECT K$[2]"4570 CASE "<","V",">","^","E"4580 $OFF KBD"4590 CASE ELSE"4600 BEEP S4610 GOTO Spin"4620 END SELECT 4630 PRINT TABXY(Col,Line);,4640 PRINT Enhance_off$&Score_name$(E);4650 SELE? 1 and 13.4830 !4840 DEF FNScore(INTEGER Slot) 4850 !4860 OPTION BASE 1E 4870 COM /Scorecard/ Score(*)4880 COM /Dice/ Dice(*))4890 INTEGER This_score,Frequency(1:6) -4900 IF Slot<>12 AND Score(Slot)<>-1 THEN r4910 BE 480 Got_minimum=0i5190 FOR I=1 TO 5/5200 *IF Frequency(Dice(I))>=Slot-4 THEN =5210 Got_minimum=1c5220 LEND IF5230 NEXT I+5240 This_score=This_score*Got_minimumH 5250 !s5260 CASE 9<5270  $eak=FNMax(Streak,High_streak)a5520 Streak=05530 lEND IF5540 NEXT I*5550 Streak=FNMax(Streak,High_streak) 5560 IF Slot-Streak<9 THEN "5570 ,This_score=(Slot-7)*105580 ELSE5590 This_score=05600 &CT K$[2]4660 CASE "V","<" 4670 2Eptr=FNMax(1,Eptr-1)4680 CASE "^",">"#4690 2Eptr=FNMin(Maxe,Eptr+1)n4700 CASE "E"4710 ^RETURN E4720 END SELECT4730 END WHILEE 4740 FNEND 4750 ! FNScore(INTEGER SloTEP 110,.5N4920 RETURN 04930 END IF*4940 IF Slot=12 AND Score(Slot)=0 THEN 4950 BEEP 880,.5D4960 RETURN 04970 END IF4980 This_score=0 4990 !s75000 ! score calculationse 5010  ! e9 == full house5280 GOSUB Sumall5290 INTEGER Got_3,Got_2 5300 FOR I=1 TO 6*5310 $IF Frequency(I)=3 THEN Got_3=1*5320 FIF Frequency(I)=2 THEN Got_2=15330 NEXT I"5340 IF Got_2 A END IF 5610 ! 5620 CASE 12F65630 ! 12 == yatz! 5640 j! 5650 INTEGER Target,Yes5660 Target=Dice(1)5670 Yes=1t5680 FOR I=2 TO 5)5690 IF Dice(I)<>Target THEN Yes=_t)O4760 ! Score the current roll. Enforce YATZ rules. Allow zeroing of a score$Q4770 ! only once. Allow a positive score to be entered into a slot only once,1N4780 ! Except for YATZ, which can be entered as many times as it comes up,N4790 y>! 5020 SELECT Slot 5030 !E5040 CASE <7SN5050 ! O Upper half. Sum dice that match the current slot5060 FOR I=1 TO 5!5070 IF Dice(I)=Slot THEN e(5080 This_score=This_score+Slot5090 END  ND Got_3 THEN 5350 $This_score=25t5360 ELSE5370 $This_score=05380 END IF 5390 ! 5400 CASE 10,11@5410 !  10 == small straight@5420 !  11 == 220 5700 NEXT I5710 IF Yes THEN 5720 $This_score=50a5730 ELSE5740 This_score=0<5750 4! Can't zero Yatz unless it hasn't scored yet.K5760 @! Couldn't catch this before because we could have had Yatz..l"*T TABXY(Col,Line);54480 PRINT Inverse$&Score_name$(E)&Enhance_off$;]4490 ON KBD GOTO Checkkey4500 Spin:GOTO SpinT4510 Checkkey:K$=KBD$ 4520 IF LEN(K$)<>2 THEN y4530 BEEP K4540 &GOTO Spin>4550 END IF4560 a ! unless it is zeroed first. If and of these conditions are violated,O4800 ! BEEP and return 0. Detect when a score card is full, and return 2 ifeO4810 ! so. Otherwise return 1. Caller is responsible to ensure that Slot ise4820 ! between3:IF5100 NEXT I 5110 !E5120 CASE 7,8=5130 ! 7 == 3 of a kind =5140 ! /8 == 4 of a kind 5150 GOSUB Sumall 5160 &!U5170 INTEGER Got_minimum 51 large straight$5430 INTEGER Streak,High_streak5440 Streak=05450 High_streak=0k5460 GOSUB Sumall5470 FOR I=1 TO 6!5480 IF Frequency(I) THEN e5490 Streak=Streak+1H5500 ELSE35510 High_str7 [=l +6690 CASE 2,36700 Oldphase=Phase-16710 GOSUB Unroll6720 GOSUB Roll6730 CASE 46740 Oldphase=36750 GOSUB Unroll6760 GOSUB Scorel6770 END SELECT6780 SUBEXITE 6790 Roll: ! 6800 PEN 1I6810 N=]gative, replace it with a new random valueA7180 ! between 1 and 6. Set Currdie to 1 and draw the cursor.]87190 ! Return 1 if no changes were made, 0 otherwise7200 DEF FNRoll_dicef7210 OPTION BASE 1f7220 COM /Bases/ INTEGER X,Ye(7230P6020 NEXT I66030 ! Main exit point6040 IF Full THEN 6050 RETURN 2 6060 ELSE6070 RETURN 16080 END IF 6090 ! 6100 Sumall: !:6110 This_score=06120 FOR I=1 TO 66130 FrjHR$(132)6370 Ui$=CHR$(133)R6380 Ub$=CHR$(134)R6390 Ubi$=CHR$(135)6400 PRINTER IS 16410 CONTROL 2,1;0)6420 CONTROL 1,4;0) 6430 W=11 6440 H=W1 6450 Pad=2O 6460 X=0= 6470 Y=886480 OUTPUT 2;Clear_crt$;"64 PhaseE6820 GOSUB RrrT6830 RETURN r6840 Unroll: !6850 N=Oldphase6860 PEN -16870 GOSUB Rrre6880 RETURN r 6890 Score: !N 6900 PEN 1N6910 GOSUB Ssse6920 RETURN s6930 Unscore: !s6940 PEN -16950 GOSUB Ssb COM /Dimensions/ INTEGER W,H,Pad)7240 COM /Curr/ INTEGER Currdie,Olddied7250 COM /Dice/ Dice(*)7260 INTEGER I,Changed)7270 Changed=0,7280 FOR I=1 TO 57290 IF Dice(I)<0 THEN 7300 Currdie=INT(RND*6+1) 7310 45770 IF Score(12)<>-1 THEN 5780 BEEP 220,.1>5790 RETURN 05800 END IF5810 END IF 5820 ! 5830 CASE 13F75840 ! +13 == Chanceo5850 GOSUB Sumall%5860 ! equency(I)=06140 NEXT I6150 FOR I=1 TO 5'6160 This_score=This_score+Dice(I)M16170 Frequency(Dice(I))=Frequency(Dice(I))+1p6180 NEXT I6190 RETURN e 6200 FNENDU6210 !6220 SUB Init_game(6230 OPTION BASE 1iy6240 @90 OUTPUT 2;"#SCRATCH KEYX" 6500 GINITT6510 GCLEAR6520 Oldphase=0 6530 SUBEND6540 SUB Lable(INTEGER Phase)6550 OPTION BASE 1E6560 COM /Bases/ INTEGER X,Y(6570 COM /Dimensions/ INTEGER W,H,Pad$6580 COM /Lable/ INTE pse6960 RETURN s6970 Sss: !6980 MOVE Myx,Myy6990 LABEL "Enter Score"G7000 RETURN E 7010 Rrr: !N7020 MOVE Myx,Myy7030 LABEL "ROLL "&VAL$(N)S7040 RETURN R 7050 SUBEND7060 DEF FNMax(INTEGER A,B)7070 IF A>B.mThat's all for this one 85870 END SELECT ! Caller ensures input is in range. 5880 ! 65890 ! sApply Score5900 IF Slot<>12 THEN 5910 Score(Slot)=This_score 5920 ELSE*5930 IF Score(12)=-1  COM /Crt/ Clear_crt$[2],Home$[2],Underline$[1],Inverse$[1],Blink$[1],Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1]$6250 COM /Lable/ INTEGER Oldphase6260 COM /Bases/ INTEGER X,Yp)6270 COM /Curr/ INTEGER Currdie,OlddieU6280 COM /Dice/ Dic GER Oldphase6590 INTEGER Myx,Myy,NE6600 Myx=5*(W+Pad)+2*Pad 6610 Myy=Y+4W6620 MOVE Myx,Y+10+6630 SELECT Phase6640 CASE 1(6650 IF Oldphase THEN GOSUB Unscore6660 Oldphase=16670 GOSUB Roll6680 PEN 1    THEN RETURN A7080 RETURN B 7090 FNENDU7100 DEF FNMin(INTEGER A,B)7110 IF A x-h n|H!h6>J(FfR>`NN^NuNV mb hjf@ mbA-H n0(|@2;N"**2N`NR`Np`Nn`-nB. nJ(g2/-`D mbphjf6 mb-h n"nC!IP-hP"nN)-㈁(N nJg/("hN-mb nphjf,-h"np)FW)0V g ;|:NJN^NuNV^J-g ;|VNJ/-/Hz+O|Av+Hb mbA-H-mbj-nf nj1|j"nf3nBB) 7| A'H B nI'LI%LB %|2$B(5|.|,5|05|2B*-I6%L4B8I%LfJ-g ;| NJ`J&g/-& m"NUN\Jg ;|6NJ+mA+HB nCN B` mb hjfZJ&g/-& m"N mbA-H-n nJg "mbBi` nJ(gUN Jg ;|FNJ @G#KDBHG#K\B`Gh#KdBhGl-K&nIL&BIҶ'LB (nI'L#|B#|B#|B#|DBN nC-I"nEt"E-J$nLfH5| A%H BBi.B),|- nEt-J$nG$G-K&nL$H8G#K` nBhZ`D n-hX.@"na\+HּBAt+HִBָA+HBA͜+H֘B֜A6+HJBNA+H BA+HB-x-n nC| BC!IC-I"nE"E-J$nLH5| G%K BG%KG#KB #| $B(3|.|,3|0Bi2B)-GH#K4B8G#Kd`NVNs-x n(rf0(H-@` nHhHnNsJn ;|msNJ  \-I"n#iR$N^.NuNV-n nC\-I"n)#VJg$hX *hЩ$hX%@h`" n"n$iX *dШ$iX%@dN^ _PONNV n(0VJgj-n n"h-ipnf(VJgF"hX )h<(0V tWg 1|'#.-hXWJ)^Wg/.<<?<N` nBh\N^.NuNVJg n hX1|\N^.NuNVJg n hX1|ZN^.NuNVJg n-hX/.HnN# nA\-H nJWr ( Wg4"nBi\-n"nJiZf/)BJNg/)N$iJN`F n1|\-nqG#KDBHGV#K\B`G#KdBhGl-K&nIN&BIʸ'LB (nI'L#|B#| B#| (B#| ZBN nC-I"nE,"E#JB E#J$B(3|.B),3|03|2|-E#JBE"#JBED#J4B8E#Jf B.` n"hX$n$>`l n(#rf."n09PHf B.` n09PH `* n09P Hf B.` n09P H N^ _PONNVJg.-n nC\-Ip(1f"n)#V$h$jV )!V A)!V B )arA@a` n-hX"np)brA@b np(1f"n)?N2/.B' n(V"nJg/)$iNSxn n"hXSQ0(VJg:-hX"nBB#|JBN3|Z|^p)ar@A@a`: n-hX"nBF#|RBV3|\|_pwZ%KBG%K G-K&n6I'LBI'L N nC-I"n2El#JBE#J E-J$n4 GH%KB&n%k Er'JEb'JBEV'J2B6Ef'JBEZ'JbBfEN'JzB~EB'J$B(N^NuREMOTE NVp xn"NdNjAvHC+IvBzN^NuCS80 HP9885 NuNONONONDNOnNONNNPNONNNPNRNϮNONOfNONON@NONONONmpNONONONO6NO*N1NPFNP^NϠNPbN0NO6N7 [=-n. . n(0V gn"hXJi\V. g /.N@ n"hXJiZV. g /.N.8g ?<CNg. n/(XHnHnHnHnN``BR Am``N^ _ NNVBBBB-n np(1fp np(^W. r(_W. g2.N^NuNV x-h n(0VJf ;|NJ np(1f ;|f:NJ/.<B'N0/-/HzP+O nA\-H/. n(#V@(#V<N+o N,_+_pCmf N`NJ/.<B'NN^NuNV x-h -n n !E2!JRBV` nCb!IRBV n1|\|_|@bBd n0RP-n n"nLfH\#n XE\-J$n*"VJg%j n("VJg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n"n o2"n3|B."np)arA@a/)B<<?<NBN^ _NNVBBBBJgN n-hX"np)ar A@a nJFgF"hF)0VJg2/(F.<?<N: n-hX"np)br A@bNd"Nt+o N,_+_NdNXN^ _\ONNV x-h n(0VJf ;| NJ np(1f ;|^jNJ/.<B'N/.<N0 N<,_+_/.B' n(V"n"i"iJg/)$iNNJ-n n(VJgt"n#nB$nJ*1W$n*NV (VgE#JJBN` nC!IJBN n1|Z|^|@aBh`t n!nF"nJ)1W"n)NV "n)Vg"hp)1W툁((VJg"hp)1f ?<DN\Z n(V(V g ?<FN\4 n-h-h"np)^f ? .m . n .:W@-n n (:6m (:6-@` n-h:-n n .6m (6 .^.g: . n!@. <?<N``H nB| `L`, nB| `0`/.N n("VJg"SJfB| ``/.NH n("VJgS nB| ``/.N n("VJgS nB| `x Wg=|"n`=| nS n("VJg (oJ!h=|pW("V ("V ("V g "n`\ n (f("VJg<"npnf =|`pnf =|`=|`jpnf =|` Bh.Rx"x#n@"xEd#J$B(C!N^NuNV x-h@ nAf-H n""/-/Hz"+OYN4 n!_+o N,_+_?-NXN^NuNV x-h@ nAf-H n""N^NuNV x-h@ nAf-H/-/Hz+OYN-_@JWg "n!i6=| `. n (6 n!@Jf =| `=| -n n"n . 2ѐ"nJf&)#VJg =|`=|` n("VJg (\("V g!h=| n("VJgR (o!h=|` [`X`T`P n1|Js.-hX"np)arA@a"nB| `2`/.N.`T`/.HnN nJxf`/./. n/(x.BHz "h"iJg/)$iN n-hX"nJi\f/)FJVg/)V$iRNN^ _ NNV n-hX nB nA\-H nBVpnf =|`B npW("V ("V g=|"n`=|` n (Sfpnf=|"n`hpnf=| n`LpnfB n("VJg =| `$ npW("V g=| nn N^ _ `+o N,_+_?-NW~ n("VJg"!n` n" n"N^NuNV x-h@ nAf-HBn-x-x-nHnHnNWJnf`pn] n(g ? .m . n .:W@-n n (:6m (:6-@` n-h:-n n .6m (6 .^.g: . n!@.@JWg "n!i6=| `. n (6NNVzט-n nC\-I"n )Ю #@ )Ю #@$hX *hЩ $hX%@hJnghp?nf"1|?.-hX$np*aP@@a`$ n1n.-hX"np)arA@a/.<<BgNX`&` np( S@@2;NTJN*,_+_ nJ(g/.B'B'BgN?-NZp-n nC\-IJ(1W(NV "n)"Vgn/.)#V@)#VB'NX/-/Hz,+O/.B'px^WN+o N,_+_?-NY nA\-H n("VJgn/.(#V@ n(0Vf nP`, nJ(g?< .NVh` nP nh n("VJg!1n` n!1n N^NuNV x-h@ nAf-H n("VJg "` n" n"N^NuNV x-h@ nN^NuNV x-h@7 [=Z/)FJVg/)V$iRNN^ _ NNV n -hX n A\-H n (6-@-n n (>m .> n-h: .m . n .>W@-n n .6m (6-n n (>6m (>6-@` n-h>.@".WVJg n("VJgJ"nJ)1W("V g"-iX$np*bP@@b| ` n| `( n("VJgh"n-iX$np*bP@@bp( g@p( S@m*|n"@2;N` n| ` n-hX"np)bP@@bJ W "nB| `2`/.N^`T`/.HnN nJxf`/./. n/(x.BHzd"h"iJg/)$iN n-hX"nJiZf/)BJNg/)N$iJNN^ _ NNV x-h<-n n"x"iC& !|NBN^NuNV1%/-/Hz"+O/8yV"hRN` ;|NJN^ _PONNV x-h<-n n-h/-/Hz+O"xVJf ;| TNJ n0(mL| nD@2;N(\n8Vt&!|` n(`VJg"n#|` n!|` n"n#h6` n (6〰>nd@ .^.g: . n!@.@JWg "n!i6=| `. n (6 n!@Jf =| `=| -n n"n . 2ѐ"nJf&)#VJg =|`=|` n("VJg (\("V g!h=| n@.V .Vgl"np) ]@mX| nP@2;ND:pV)"V Ag=|?` =|?``=|?JngD n1n.p?ng-hX"np)brA@b/.<<BgNH` np( S@@2;N >4p> BHzN?+o N,_+_?-N?tN^NuNV1&/-/Hz.+O/8BHz`N?`?<BgBgN?Z+o N,_+_?-N? N^NuNV x-h<-n n"x"iC !|NBN^NuNV1'/-/Hz"+O/8BHzN>+o N,_+_?-N>N^Nu (6】> n (>6m (>R6"n#@` n (>R"n#@`|Y n/(ND n!_`b n (6〰:n (6】: n (:6m (:R6"n#@` n (:R"n#@` U n/(FN n0H!@`U n/(BNr n0H!@` nB"nW("V g"n-iX$np*aT@@a nJW("V g"n-iX$np*aX@@a/.<<?<Nܦ`t` nB| `&` nB| ` ``/.N n("VJg"SJfB| ``/.N6("VJgR (o!h=|`6 n (f&pnf =|` n!h=| n (<"n )0V tWg*SJWr( Wg =|`=| nn N^ _PONNVz-n nC\-I"n )Ю #@ )Ю #@Q>.JW("V g"n-iX$np*bT@@b nJW("V g"n-iX$np*bX@@b/.<<?<NԖ`` nB| `` nB| ``h nB| `l`L/.N n("VJg"S NV1(/-/Hz.+O/8BHz`N>?<BgBgN>+o N,_+_?-N>LN^NuNVBnJg&-n n(0VJg p(4=@=n N^.NuNV-n n-h:-h> .W@ .6m (6 n .6m (6 .^.g n("VJgS nB| ``V/.Nؠ n("VJgS nB| `N```/.N`h`/.HnHnNH.鈁. nJxf`/./. n/(x.BHz4"h"iJg/)$iN n-hX"nJi\f$hX *dЩ $hX%@d.VJg@.VJg"-hX$np*bR@@b| ` n| `.VJg n-hX"np)bR@@b"np) S@mP|nH@2;N8<<<<888pV)"V Ag| `` n| . 3JfB| `,` /.Nд n("VJgS nB| ``/.Nx n("VJgS nB| ``/.N< n("VJgS nB| `x`X`T`P n1|RC.-hX"np)brA@b   .-@` n (6Ю-@-n N^.NuNV-n n (6-@J(_WJ(^WgB:!n>` nJhZWJ(_Wg> (:Ю!@> (>m .> n/(BJNg/(N"hJN`X nJh\WJ(^Wg: (>!@:J:l .Ѩ: n/(FJVg/(7 [=6 H npPV.Ag ?<NN/z n (J"n#@Y/(>p(H?/N n!_$"n ):6R!@ p)Ff/($Hh,Hh/N<`Y n/(Bp(I?/Nr n!_(JfHY"n/):p)G?/NJR n!_ ($R!@,1| ((R!@01|`V n ( U"nV@J.fLY?0)HШ/8їN+-_ n (Ю갮^".\g||RnJ.gjN^ _ NNV-x-n n|1B:B>BBBFC2!IJBNC&!IRBV|_|^|b|aBdBh"nC!IC !IB N^.Nu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v-`+`|+`x+`p+`l+`d+``+`X+`T+`L+`HvE`v,`v0+g`v0+g g|`tv `p g`F`\+`+`+` +`)7 [=**NNV/. /.NN^ _PNNV-xJ-n n!mֈC!IC+IֈN^NuNVp xnNN^NuNV-n-n n-PR N^ _XNNVf/-/Hz6+OJ-g;|6.mNu|Ax+Hb mb1|j-xJt-ntpUN np0-xl"nl)rg;|*zNfJ׎g/-׎ m׊N|b+o N.,_+_0-HH@rP@V.cg.mNu|c`N ndJg/( hNN^NuNVp xn>p xfY/<N-_!` nLHA.+HBNJ"@D0N0h<* 2.1@.$d"**г@ .n@ x@, ! Check for BASIC 2.1 or BASIC 2.0@ ,@ @P@P@@(@͐@ @T(@R! *- Test stat*@@8 !"" ʤ@>82/Install the disc to be repacked and press CONT.@ >$@ "@* ,ٵ#,KK Clear Screen@ *6@6 @* Set up software interrupts for recovery.@ 6J*.V@>\(Tbp   : (@(p (Bl(B@  6 P2  *P 6.(:&(T& 0000*Bt *.mNu np!|"nl-ih$nhpr=Afnfn6=@ nh0.H"np00H//)N np!_0.R@h x"np#hNx npHh Nr npJ l;|.mNu+|JVg/-V mRNB-+o N,_+_B-.mNuN^NuNVZ-xJd-nd^ mb hjf\Ah*h(dd0dA2"*0 2Vd:!LdJ AX A`0 :h @En0 Rt Bz BAD\@ E0* ement to check for 2.1 basic or 2.0@ T @ (@zѲ@*ٵ#,KK Clear screen@ *@  Print title page@Ӳ@ @ ղ@Ճղ@2 MASS STORAGE@ղ*C|H#|B|I/./(/(J׮g/-׮ mתN8VJg n^/(NfNt-nZ n^"nZ#h >|H#|:|G/./(/(J׶g/-׶ mײN-nZ nZJ(Hc/(>HxJ׎g*  P @ EtartFNWidt`CheckGabortedIWStarLineWord$TitleRestartFNWidthCheckAbortedInit_and_check Pack_and_moveRestartEndingSpinBasicBasicString1$String2$BMsi$StTyp_aidFNMsus$Msus_err* @Ձղ@2 FILE REPACK@ղ@Ճղ@ղ@ @  ! 2@8!"!Enter the mass storage specifier.@&82 (Default is Ӳ2)@ & "@  2*sPk3'NVN^ _ NNV0. S@@0{N$@P?<ND?<Np xfY/<Nn-_!J nLHA.+HBNN^NuNVN^NuNPN1 T@^ ٛ!"GERROR: Bad select code or device sel+U@ @ @6 춎+ Recovery Point for errors, and user abort:@ 6 2END OF PROGRAM.@ @ ?ə$@  Restore typing aids@, ٵ#,K#LOAD KEY@, Repack + x Verify_w_pFNLif_filename$ StartoverB Write_protect Write_errorEndingIdle_write_msgString1$StMsi_typing_aidString2$DoneBasic6@!@!! @+   *@ +@ -2@@<4!"&REPACK IN PROGRESS. DO NOT DISTURB !!!@ <>#@ H@. R# Verify Sector 0 Information First:@ .\@* f2Verify Sector 0 Information@*p ͻ@ z +ector--try again. b@^ڻ >!C г@^ ۛ!"GERROR: Bad mass storage parameter--try again. a@^ܻ >!H L@^ ݛ!"GERROR: Disc controller not found--try again.+@ PPX $0 Vd0d A& @. @ 8d@BD J!F" PdTZb lt+ &#@P$@P@(%@(!!! ! % )@(&  @0@ @@ :@* D Establish Max, Min Parameters:@ *N@ X@ b@, l!@ 64 Sectors (16,384 bytes)@ +@  ǵP@~@, 2Word 0 is out of bounds = Ǥ@,, 2Word 0 should be P@뤳@ ,  萳@  Vol(0)@ӄ Յ ղ@ @0 ʛ2Directory Start is too small = @*0 ԛ2Director+ ` @^߻ >!I ȳ@^ !"GERROR: Bad device type in msus--try again. j @^ >!N D@^ 㛁!"GERROR: Bad mass storage volume label--try again. +*  10d AF:d008d00<0d00d A0Fd< B, BL @Eb60\@ )FhP p+ Z,v@2 ' Maxsize is largest buffer (in sectors)@82, which may be used by this program. A check@68+ is made to make sure there is enough room.@ 6@ 1%@ ͤ@ @" Ƃٞ# C+]y Start Minimum = @ *  萳@ 蹶 Dirstart@ ǵA @, BWord 6 is out of bounds = Ǥ@$, BWord 6 should be A@ $  萳@  Vol(6)@$ ǀ "@, .BWord 7 is out of bounds = Ǥ@", 8+@ T@ @  Perform the Repack@ @  Ѳ Setup and verify@  @ @" Ѳ Perform the REPACK@2"Ñ2#DO YOU WANT TO REPACK ANOTHER DISK?@2ąYES@dž+ f @^ >!R @^ 囁!"GERROR: Mass storage unit not present--try again. Y @^ >@Z 蛁!"Encountered error #"&. Program aborted... @ Z +7 [=,!,( Verify the directory before proceeding:@ 4ⶎ@ 쑵BVerify Directory@  萳@ n@   ͻ@ \@2  ȁ * Verify NO Write Protect@2 ( ȀJ@ 2 ղ@ <,S( " ͻ@ , @, 6׶! Okay, return to calling context. ,@ @ J!SJ@ T?ə$@, ^BThis disc is WRITE PROTECTED;@*, hBpush RESTART to start over.@"* iRESTART!, !move Pack_and_moveSizeMa`sizeDirsdartDirlen Pack_and_move Pack_and_moveSizeMaxsizeDirstartDirlenDoldDnewIoldInewJOldNextsecNew Move_dataCatalog&@:!@$D!, Pack_and_move  `6< Z J &pd0   "Dd" A( @0 @ :dBDFdPZ,  ղ@ F  ղ@ P  @,ZBREPACKING FILE: B would@0,dB!attempt to write over valid data.@ 0e Restore typing aids@> g%(@ ނٵ#,K##LOAD KEY$@>nٞ,B"r B1Disc is WRITE PROTECTED, push RESTART when ready.@ B | @ F@> BError B" happened around the line labeled:@> B 'Write_error'@    Restore typing aids@> %(@ٵ#,K, !! ! ! )@ $N @ X!) @ b@ l @ v 萶  1st DATA SECTOR@ @@  ͻ@ .@   @  Ȁ@  !@  Ȑ@ ,b h8dn:d~0Vd1 B0 B @E\vsazeDirst0IJ Move_data Move_dataNextsecDNewSizeMaxsizeDirstartDirlenIJ File_typeOldstartLengthTempFile$FNLif_f,BWord 7 should be @ " B 萳@ L Vol(7)@Vӈ Չ ղ@` ij@0 jB Directory Length is too small = @,0 tBDirectory Length Minimum = @ , ~ 萳@  Dirlen@ س@6 B'Sector 0 (,9@x Just in case@  Oldstart@ @"BFILE: B has a@,"Bnegative number of Sectors =@ , Restore typing aids@> %(@܂ٵ#,K##LOAD KEY$@>ٞ,j##LOAD KEY$@> ٞ9@  @&  ERRN 83, ERRL(Write_error),&"ٞ#MASS STORAGE IS ""<+@,̺ Msi_typing_aid  '!@ & Init_and_check @ 'PP,  ޳@  ȁ@  ղ@ Ѳ@, B/,KBLIF REPACK Complete.@,1ȵ?ə$@׶ All done@   Old@   萳@   @*  ղ@ 4萳@ > ͤ@ H!,VOLUME INFORMATION) indicates@26 B$that this Disc is not LIF compatible@2 ٞ9@  Restore typing aids@> %(@ ٵ#,K##LOAD KEY$@>  Just in case@Ĺ Flag@ ζ@4 ,9@ Just in case@  Length@  萶$ Length=0 is OK@ ҹ Old@ ܴ @洎 d@ @: . Verify that the disc is NOT Write Protected:@ :( BVerify NO Write Protect@, 5 @0$"& " !Ld0d A" @* @ 4d<BH NT"VdZ2 b&pdf0dp@ ExP afd_, ) @ R Inew@ \ Old@ f@p~@4z@ @ @4  ȁ됳@   ղ@" Dnew, Inew, Dold, Iold@ "Ѳ@, B/,KBLIF REPACK Complete.@,,7 [=-- #,W Ǥ@  :@  D@ Nӄ Յ ղ@ Xӈ Չ ղ* b 2A,X,10A,X,A,2X,6A,8D,9D,10D@H* lB/,KB ***** Special Catalog Of ӲB ******@&H vB" VOLUME LABEL: ",K@@& B2 F-?PROG@" ! ȵA B*@" ! ȵ@쐳@ @   ȵ1A@ BBDAT@$ ͻ@.ӄ Յ ղ@ 8萳@" B! ȵA B*@"L! ȵ@쐳@ V@ `-Nilename$ FNHl_to_dSegmentRString1$StSlurp_and_belchString2$BasicB@Լ!@ռ@P@P@ּ@޼ ! ! !@  @@ @ @  -]4 춎@ B:@ Ȑ@ Ȁ@ ͻ@  @&  ( Move data for this file.@ & 26  <( K,": Segment ",K," of ",K," Segments."@6 F @ P 1%@  Z @* dB: -H@ ̺ Slurp_and_belch@ ֱ Move_data PP  *v:(6 00    & ,  2d68:! <"- yILE NAME PRO TYPE REC/FILE BYTE/REC ADDRESS@ @ @  곎@  ͻ@ س@  ȁ@@ B2 ** End Of Directory Found **;*@@ ׶ All done@ й@  ղ@ B-?@ ͻ@ ׶ All done@ $@ . ղ@ 8   ղ@ B   ղ@ L X@, VBREPACKING FILE: B would@0, `B!attempt to write over valid data.@ 0 a Restore typin-E Segment 1 of 1 Segment.@ * n@ xͤ@ @ 1%@ ~@"   褳@ " @ @@  ͤ@ Ƚ 1%@" ґ  褳@ " - J@! DdJNR Zd:dl0dv8dD\e$Pro$Ty`e$A$IDJCatalogCatalogVol_lab$Purg$File$Pro$Type$A$IDJVolDirDummyRpfBprAddressDirstartDirlen FNHl_to_d Cat_i-  @  ȿ@   ղ@   ղ@ 1@ B @  @2  *' Branch to specific code for each known@2 4 file type:@  >@ H Ȁ@ RBpurged@ \B->-g aids@> c(@ٵ#,K#LOAD KEY@> jٞ9@ t Just in case@ ~ Oldstart@ T@" BFILE: B has a@," Bnegative number of Sectors = @ ,  Restore typing -@ ͤ@  Length@  @6  * Fix directory entry for starting sector,@$6  restore the file type,@2$ ' and update the directory on the disc.@ 2 "@ ,  @ 6P@𐳎@ @ꐳ@- mageFNLif_filename$FNMsus$@, @@@ @@@@., ! ! ! % ) %@. @  ͻ@ B@ B@ &޳@ 0ٵB-@ f@ p ȁ@ zBASCII@ @  ȵA"@ BSYSTM@ @  ȵA@ BBIN@" ! ȵA nB*@" ! ȵ@쐳@ Թ@  ȵA@ B-aids@> (@ٵ#,K#LOAD KEY@> ٞ9@  Just in case@  Length@  ~@  ζ@&  ض This file will be moved.@4& ⶎ) Save file type and make it look purged.@ - J @ TP@@& ^Q X@ꐳ@,& hP@ DX@萳@, r @ |ͻ@  Length, Oldstart@   萳@ B@ Ƴ@ ׳  ͻ@  ͻ-7 [=.3.ZCdir Lif_fidenameAd File$0FNLif_filename$IDir Lif_filenameA$File$J @@@ @ !@ B@B@ @ ٵB#,WȤ@  쳎@ .U Ҷ @ ܶ @0t ` =Vd0   dde LineLifeWNIAb4@ @ v @ *LineLineWNIJ@  @ . nnn0A2B$PB$PB$PFNWidthWidth@ D@  N@ XbzjPv R0 B. m_addressUnit$Select$Prim$Device$Msi$@B6 This function returns the Msus. The code is secured.HB!!!!!HQ0됶 $FFFFCF76H A&bHA&bH A&bH*A&bH 4. @B@ 츎س@@  A$[1,1]@   A$[2,2]@  @ R@ (@ 2  Lif_filename$  <h@Lz@hnL0:d0 .`@ B*@ >@B @ "@ ,B*@ 6@ @@  J @ T ^\@@ $F\  >d0   . #D B@ E(idTyp_aidBctString!$String"$Basic@ 'Typ_aidTyp_aidStString1$String2$a@ l@8 v, SUBPROGRAM TO SET UP THE OUTPUT TO KEYBOARD@88, TO TURN OFF TYP.H >H H1&H R2H\TH  fH pL"0HzH dH ހH  2INTERNALH ބƳH  2HP9895H ޅH.BF  d_dH FNHl_to_dHl_to_dHighLowRes@ F@ PX@萳@" ZX@萳@"" d$X@ꐳ@" nBX@萳@  x@ .9ddd*d,d$ Last_half First_hadf9TitleTitleWWord$ Last_half First_halfIJ n@ h @ r ꐳ@ | N@ ꐳ@ `@ @ @   . ING AIDS IN BASIC 2.1 DURING@8 PROGRAM EXECUTION@ @ @P@P@ @& 1!P1!X@&&1!X1!C@.&ٵ#,K# SCRATCH KEY@ .ƶ@ б .)  2HP8290XH ʻކ(H  BHP9885H ޻އrH.  BHP913X ONE VOLUME - 5 MBYTESH. ވH0  BHP913XB ONE VOLUME - 10 MBYTESH0 ޵!H  .@ j*@t @~ Catalog   8P@ J4 08d0  "  $ (d.idename$I.2  FNHl_to_d  vn d0dA2"*0 2Vd:!LdJ AX A`0 :h @En0 Rt Bz BAD\Q0/ #PRETTY M #RENXINDENTX(#MSI DRIVE 0 #MSI ":HP8290X,701,0"X*#STORE " " <#SCRATCH! #SCRATCHX<#EDIT @X+#MSI DRIVE 1 #MSI ":HP8290X,701,1"X:)#LOAD/C|H#|B|I/./(/(J׮g/-׮ mתN8VJg n^/(NfNt-nZ n^"nZ#h >|H#|:|G/./(/(J׶g/-׶ mײN-nZ nZJ(Hc/(>HxJ׎g/E QQQ Q!"Q#$Q 'Q() *Q&+Q0:-QF.QL/T0Q\1Q/BCS80H ޵!4H( $ BHP98255 FUTURE - EPROMH( .޵!|H* 8 BHP98259 FUTURE - BUBBLESH* B޵1H L BREMOTEH V޳H ` BUNKNOWNH  jH( t/s " " <-#RE-STORE " " < 0 #CAT X ;#INITIALIZE " "<K :INTERNALI :HP913X,700E :CS80,7000[#SET TIMEDATE DAT/sPk3'NVN^ _ NNV0. S@@0{N$@P?<ND?<Np xfY/<Nn-_!J nLHA.+HBNN^NuNVN^NuNPN GOSUB Lowright1500 CASE ELSEo1510 BEEP S/1520 DISP "Die value out of range: ";Spotsr1530 END SELECT1540 GOTO ExitT 1550 Center:!E1560 IMOVE Cw/ NNV/. /.NN^ _PNNV-xJ-n n!mֈC!IC+IֈN^NuNVp xnNN^NuNV-n-n n-PR N^ _XNNVf/-/Hz6+OJ-g;|6.mNu|Ax+Hb mb1|j-xJt-ntpUN np0-xl"nl)rg;|/ NfJ׎g/-׎ m׊N|b+o N.,_+_0-HH@rP@V.cg.mNu|c`N ndJg/( hNN^NuNVp xn>p xfY/<N-_!` nLHA.+HBNN@ v0 b n/N Jz/@FTnn@!@$nq /29/81q /29/81q /29/81h@$ ٞPLOAD KEY "KEYS"X@ $qw,-Ch2160 RETURN T 2170 Spot: !2180 IDRAW 0,-1/7 [=0J0bQh3Qn4x5Q6Q7QQ9Q:Q;Q<=QQifeWord$ditleRestartFNWidt`CheckabortedIWStarLineWord$TitleRestartFNWidthCheckAbortedInit_and_check0F$@ @ !X@  "@ @ *Բ@ @ "+,Ӳ@ ,-)ղ@  6 Sel/Desel/@ @Roll0@ JScore1@ TQuit2@ ^4@  h r  |/0ղ@  z'@ @ '@  (@ ( 2 @2Done!@ @ ʶ@@ Զ4 **[* Main Program End@ @޶@4 趎) SUB Onedie(INTEGER Spots,OPTIONAL Erase)@@40 eqhCorner DimensionsWHPadCenterCenterUprightUprightLowleftLowleftUpleftUpleftLowrightLowrightMidleftMidleftMidrightMidrightExitExitSpotSpot3@ 8 @J B!!!!!!&* Half, q0 Pack_and_moveRestartEndingSpinBasicBasicString1$String2$BMsi$StTyp_aidFNMsus$IBasesMsus_err Init_screenXYCurrCurrdieOlddieDiceDice DimensionsHPadScore ScorecardFinalQuitRoll Scorecard Dont_care FNRoll_diceLab0@ 6ղ@    0 @  ))萳@ ,Ӳ1@ -)ղ@ )1@    4@  7@ 7 񎷳2@ 6ղ@   @ @ 7 @*  2<2V0 5 Draw or erase the image of one die with rank given@@@5 'Spots'. If optional param Erase is present, erase@@@4 the image by setting PEN -1.Otherwise, set PEN 1.@@@5 This SUB relies on the calling context to position@:@0 uarte and three-quarter dimensions@,J L ! Flag whether to draw corners@, V ! ! @  ` 퐳@ j 퐳@ t 򷐳 @ ~ ꐳ@   퐳@  퐳@  萳@   @ @  큿@  큿0J~leToggleToggleRollScoreQuitCheckkeyCheckkeySpinToggleK$FNMaxFNMinCursorSlotRet FNSelect_slotFNScorev@  @ Բ@ !@ (!! @2!! @<! !@F!"!# $ 0aV@* &8Ӂղ@* 02>2^aV@* :9Ӆղ@  D2E^@ N0@ X賎@  b$@ l @ v@ 賎@  $@  @ @  :Բ@   1@ 0 / the graphics cursor to the appropriate place@ :$PP@. @  !Q Q_ $( Q, Q4 @0@  큿@  큿萳@   @ 칳@ @  @  @  @ @ ( @  2 @ < @ F ꀻ @  P @ Z  @ d낻 @ n 뀻 @ x @  0@P!%& @Z'!(!)!@ d)@ n  UNTIL Quit@ x! NTIL Q@ &ǁ됳@ 됳NT@"   UNTIL Final (Score)@"  UNTIL@ !ǁ됳@ 됳NT@  @ ! @  #@ 0 )@ -Ԅղ@ ڼ;!;ղ@ <ղ@  $@ *;;ꐳ@ 4@ >ꐳ@& H<ꐳ Score isn't final@ & R*Բ@ \'@ f@ p*0  B _DQHPQX`QhpQxQQQQQq`Corner OnedieSpotsEraseCwChQwQhTqwT0 @  @ @    @   @  뀻 @   @ ȹ@   @ ܻ he@  @  he@  @ @  he@  @ "@ ,@07 [=11  QQ*, _. Q2  Draw_cursorXPBasesHisxY DimensionsWHPadMyp@ @ ! @ ! @   !@ (!@  2 @ 1  J@ Tǀ@ ^ ǿՁղ@ hǿ@ r ղ@ |@ 됳@ @ \  P \*Q QQ *2Q>1@   @ @  @  ں @   @ @  @    @    @ *@ 4 @  > H@  R @ \@ f @  p z @ 1|e and return the starting X coordinate of the current die.@ P t@ ~d XLd\Q0 QQ_(    1 # <@  F @ P@  Z@ d @ n򷳎@ x @   @  @  @  @   @  @ @ ȱ@  Ҷ@$  ܶ SUB Toggle(INTEGER Die)@B$ 涎7 Change the sign of the1B N _T `jrQvz~_Q_QQQQQQQQ Q!Q1 @   @  @ 뀻 @   @ @ ʶ SUB Cursor@>Զ3 Draw a graphical "cursor" under the current die,@<>޶1 Erasing it from under the old current, if any.@L<趎A Set Olddie (called "Old" 1@ aNFORMATI0FNStartxDieBasesXYWH DimensionsPad@ @ ! @ !  @ @  @  @2  Ķ& SUB Draw_cursor(INTEGER X,OPTIONAL P)@B2 ζ6 1 x given die in the Dice() array.@DB 8 If the die's value was positive, erase the die's image@>D 2 If the die's value was negative, draw the image.@ > @  H Q 1*"Q#QQ%Q&Q ccore ScoredispScore$ Score ScorecardMode ScorecardScore ScoredispScore$ Score_name$Crt Clear_crt$Home$ Underline$Inverse$Blink$Ui$Ub$Bi$Ubi$ Enhance_off$Bonus$Upper$Lower$Total1 6 he@  @@ J@ T@ ^@ h he@  r@ |@ @ @ @  he@  @ @ @ @ @ @  @  $1Bhere) to Currdie (called "New" here.)@ L@ R HQQQ"ubrNewOld   $CursorCurrNewOld Draw_cursorF1Draw the graphical cursor at the given X coordinate.@HB ض= If optional "P" parameter is given, change the PEN to that.@"H ⶎ Otherwise, set PEN 1@ " 춎@ @> Q  1 PQ Q Q&Q( Q2  = ToggleDieBasesHisxYDiceDiceXFNStartxOnedieS@  @ "! @ ,@  6!@ @ղ@  1@( BDie value out of range: @ ( @  @ & @  0@ : @  D N@  X @ b@ l @  v @   @ @  @   1vNStartx@  @ ! @ @ $ղՁղ@ .@ 8ղղ@( B NB:Changing Olddie/Currdie@( L@  V@"  ` FNStartx(INTEGER Die)@P" jD Calculat17 [=2X2  B @ B@ B@ 萳@ и賎@ 萳@ 乳@ ǿ@ B@ ǿ @ B @  @  @ *@ 4@ >!?2 2 1X,18A,10A,4X,18A,10A$ <  31X,18A,10A" F! 1X,18A,8A,4X,18A,8A@" PX,18A,@  ZǣǣǣǤ@ dǣ@ n ! ǣ! Ǥ@ xBBonus@ B@0 !B Upper Total2 GQQQQsdot ScorecardScore ccoredispccore$ Scgre_name$ FNSelect_slot ScorecardScore ScoredispScore$ Score_name$Crt Clear_crt$Home$ Underline$Inverse$Blink$Ui$Ub$Bi$Ubi$ Enhance2, B<BVB>B^BE@@ H л @ ڻ @  $@ @ @ @  @  @*   BVB<>@* *Ӂղ@* 4B^B2/_$Pad$MenuFinalIUpperLowerJBonusTotalFmt1Fmt2Fmt3Fmt1Fmt2Fmt3Fmt4Fmt4@ @ @" D D @J" ¼@ @ @ @ @ @@@@@@&J 2%@ H!#@  R萳@ \@ f萳@  p萳@ z@ B@  @ B @  @  @ @ B**&@ ʹ@ **@ B @ 踎B2B Lower Total0 % X,18A,10A@ %B Grand Total@ @ @  @ Ȁ!Z@ Ҋ?@ ܻ B GAME OVER@ 湳@@ @  FNSelect_slot@J> Choose a "slot"2 \_off$EligibleK$IJLineColEEptrMaxeCheckkeyCheckkeySpinSpinFNMaxFNMin @ @ @ J@" TD D @J" ^@@ @ @ @ @ @@@@@2@ @ @ @ @@& ցǵOnes@ ǵTwos@ ǵThrees@ ǵFours@ ǵFives@ ǵSixes@  ǵThree of a Kind@ ǵFour of a Kind@ &ǵ Full House@ 02@  @ B@  @ B @  @  $@ .@ 8񷐳 @ BB @ LB@  V@ `B@ j @ tB @ ~ @  2  in the scorecard to fill with a score. Skip@JJ> slots in the selection meny that already have a value. YATZ@DJ"9 is an exception. Allow a new score to go in that slot.@ D,@6%2 J h @@ r!!!!!!!@  |@ ! !!@ ǁ!@  @ 萳@ 萳@ ! ǀ@ǵ! @ 萳@ ֹ@ ๳@ 괎 @  @ ꐳ@ 2ǵ"Small Straight@  :! ǵ"Large Straight@ D! ǵ"YATC!!@ N! ǵ"Chance??@ X!! modes@  b@ l@* v! We were given a mode@ * @ @ ! @ ǁ񎷶@ 29@ @ 񷐳 @ B @ B@  @ B@  @ B @ ⴎ @  @ @ ٞ@   @ @&  YATZ16 Scorecard@& (B$2 GQQQ(0Q<@L _R ^hpQtx|_QQ_2  @  ǐ@ 󷐳 @  &萳@ 0@ :@  D萳@ N! @ X@ b@ l @ v   @  @  $@ @ @  @H ƻ27 [=33<V @ @   쐳@  @ ꉻ @:  / 9 == full house@ :  @ Ҽ ! !@ ! @ ǃ! @ ǂ! @ !@  !@3 }et.@H8< Couldn't catch this before because we could have had Yatz..@H ! ǁn't @1ܵ?$@ ƀ@ й@ ڹ@  䶎 @ ?! h th@6  * 13 == Chance@ 6  @$3w a positive score to be entered into a slot only once,@RTF Except for YATZ, which can be entered as many times as it comes up,@RRF unless it is zeroed first. If and of these conditions are violated,@RRG BEEP and return 0. Dete3|1n?$@  $@ .@ 8! ǀ$@ B1p?$@  L@ V@  `@ j @8 t , ^score calculations@ 8 ~ @  @   @   @L 3 f !@ !@  "@ ,@  6 @$ @!  @>$ J 3 10 == small straight@>> T 3 > 11 == large straight@> ^!!@  h@ r@ 3 6h   That's all for this one@0$ " Caller ensures input is in range.@ 0  @6 * + xApply Score@6 4! @  >@ H@ R! ǁ ! ǀ@ \! ǵ! 萳@ f@B3;ct when a score card is full, and return 2 if@RRG so. Otherwise return 1. Caller is responsible to ensure that Slot is@ R between 1 and 13.@ ʶ@  0 ,Q03 A Upper half. Sum dice that match the current slot@L  @  @ 萳@ ι@ ش @  ' Uh-oh@  쁽#@ A?333333$@ A?$@   #@ @  3 | @ ! @ Ƿ!@ 萳@ 萳@ղ@ @ ¹@ ̴ղ@ ղ@ ղ@ 쐳@ @  @ @   @ !  @4 &3 p 7 check for filled score card@ B z @ !@ @ ! @ ǁ @  @6  + :Main exit point@6  + @  ʂ@ Ը @  3QQ$Q*6Q@ QB JQR Q^ dQjrQ~QQcgreDicedice Thisgscore FrequencyI0FNScoreSlot ScorecardScoreDice30 @ (?pp@< 2 0 7 == 3 of a kind@<< < 0 t8 == 4 of a kind@ < F @ P @ Z !@ d @ n @ x @  @3  ) 12 == yatz!@ 4 0 @ :!!@  Dǐ@ N@ X! @ b!@ l!@ v@ !2@ !2@  @8 - Can't zero Yatz unless it hasn't scored y3)ށ@ 蹳@     :@  @  @  ǀ@ $ @ . @ 8萳@ Bǁ萳@ Ldz@  V@ `@ j@th3%>>@* >ղ@  HBE>@ R@ \@ f賎@ p@" z FNScore(INTEGER Slot)@R"G Score the current roll. Enforce YATZ rules. Allow zeroing of a score@TRI only once. Allo3qDice This_score FrequencyISumallSumall Got_minimumGot_3Got_2Streak High_streakFNMaxYesTargetFulls@ ޶@  @ @ @ !%@ ! ǁ and@ 37 [=4n49@ 1@ 1@  1@ 2@ @  @ ٞ@  "@ (@ 2 @ <@F NJQ Q 4J@ T @ ^@ h r@  | @ @ @   @  @ @ º @  ց@ @  @   @  B Enter Score@   4 {pQQ Q_&Q* 0 8 Q@ FQLNQVQ^adCurrCubrdieOlddaeDice FNRoll_diceBasesXYWH Dim4this license document, but changing it is not allowed. Preamble ? The licenses for most software are designed to take away your Dfreedom to share and change it. By contrast, the GNU General PublicFLicense is intended to guarantee your free47Q_& Q* 0 Q: > BQDLQTZQ`hQpvQ|QleOldphas LablePhaseBasesXYWH Dimensi4t @  & @ 0 BROLL @  :@ D@N@vnDQ0 B:  B: 0FNMaxAB ,@ XB@  b@ l@4 GensionsPadCurrCurrdieOlddieDiceDiceIChangedOnedieCursor@  @  ! @  !  @   ! @   @  !!@   @ * !@ 4 ǀ!@ > 4dom to share and change freeDsoftware--to make sure the software is free for all its users. This;General Public License applies to most of the Free Software FFoundation's software and to any other program whose authors commit toFusing it. (Some other4QQ _".8@QDHL_R Q` f   N Init_screenCrt Clear_crt$Home$ Underline$Inverse$Blink$Ui$Ub$Bi$U4GjonsPadLableOldphaseMyxMyyNUnscoreUnscoreRollRollUnrollUnrollScoreScoreRrrRrrSssSss @ P @ Z! @ d!  @ n !@ x ! ! !@  萳@   萳@  40v@vnDQ0@  @  0FNMinAB p@ B@  @ @ @  FNRoll_dice@>3 For each die in the Dic4 x@ H @ R ղ@  \@ f @ p@ z @   @ Բ@ @ /1000 ! SUB Onedie(INTEGER Spots,OPTIONAL Erase)P;1010 ! Draw or erase the image of one die with rank given;1020 ! 'Spot4!bi$ Enhance_off$LableOldphase@ ~ @J @@@@@@@ @ @ @@J  !@ 1!K@  1@ 1@ 1@  1@ 14!@  @ @  @   @ @ ҁ@ ܻ@  ꐳ@ @ @ @   @ @ "@ ,@ 6׳ @ @  4 e() array, if the current@D>8 value is negative, replace it with a new random value@DDƶ9 between 1 and 6. Set Currdie to 1 and draw the cursor.@is covered only if its contents constitute a work based on theAProgram (independent of having been made by running the Program). 6Whether that is true depends on what the Program does.A 1. You may copy and distribute ver5signed to make sure that youFhave the freedom to distribute copies of free software (and charge forEthis service if you wish), that you receive source code or can get it Dif you want it, that you can change the software or use pieces of it@in new free 5stribute and/or modify the software.F Also, for each author's protection and ours, we want to make certainAthat everyone understands that there is no warranty for this free Hsoftware. If the software is modified by someone else and passed on, weGwa5 other work which contains Da notice placed by the copyright holder saying it may be distributedFunder the terms of this General Public License. The "Program", below,Erefers to any such program or work, and a "work based on the Program" Dmeans either t5 ,batim copies of the Program's ?source code as you receive it, in any medium, provided that you Cconspicuously and appropriately publish on each copy an appropriate @copyright notice and disclaimer of warranty; keep intact all theFnotices that refer to 5Yprograms; and that you know you can do these things.B To protect your rights, we need to make restrictions that forbidFanyone to deny you these rights or to ask you to surrender the rights.GThese restrictions translate to certain responsibilities for5Jnt its recipients to know that what they have is not the original, so Gthat any problems introduced by others will not reflect on the original authors' reputations. @ Finally, any free program is threatened constantly by softwareCpatents. We wish 5 yhe Program or any derivative work under copyright law:Athat is to say, a work containing the Program or a portion of it, Deither verbatim or with modifications and/or translated into anotherFlanguage. (Hereinafter, translation is included without limit5this License and to the absence of any warranty;Cand give any other recipients of the Program a copy of this License along with the Program. EYou may charge a fee for the physical act of transferring a copy, and Gyou may at your option offer warrant5  you if you 7distribute copies of the software, or if you modify it. B For example, if you distribute copies of such a program, whetherEgratis or for a fee, you must give the recipients all the rights that Dyou have. You must make sure that they, t5to avoid the danger that redistributors of a free Fprogram will individually obtain patent licenses, in effect making theEprogram proprietary. To prevent this, we have made it clear that any Gpatent must be licensed for everyone's free use or not licen57 [=6|6uhat inC whole or in part contains or is derived from the Program or any E part thereof, to be licensed as a whole at no charge to all third , parties under the terms of this License.D c) If the modified program normally reads commands int6be reasonably considered independent and separate works inCthemselves, then this License, and its terms, do not apply to those Bsections when you distribute them as separate works. But when youEdistribute the same sections as part of a whole which is a6 gram (or a work based on it,Eunder Section 2) in object code or executable form under the terms of FSections 1 and 2 above provided that you also do one of the following:D a) Accompany it with the complete corresponding machine-readableF source6 Ham in object code or executable form with such1 an offer, in accord with Subsection b above.) CThe source code for a work means the preferred form of the work for Dmaking modifications to it. For an executable work, complete sourceDcode means all6eractively> when run, you must cause it, when started running for suchD interactive use in the most ordinary way, to print or display an@ announcement including an appropriate copyright notice and aF notice that there is no warranty (or els6 work based Eon the Program, the distribution of the whole must be on the terms of Athis License, whose permissions for other licensees extend to the Ientire whole, and thus to each and every part regardless of who wrote it. EThus, it is not the inte6 ! code, which must be distributed under the terms of SectionsL 1 and 2 above on a medium customarily used for software interchange; or,B b) Accompany it with a written offer, valid for at least threeB years, to give any third party, for a char6  the source code for all modules it contains, plus any?associated interface definition files, plus the scripts used to Fcontrol compilation and installation of the executable. However, as a?special exception, the source code distributed need not includ6e, saying that you provideA a warranty) and that users may redistribute the program under E these conditions, and telling the user how to view a copy of this B License. (Exception: if the Program itself is interactive butD does not normall6+nt of this section to claim rights or contest Eyour rights to work written entirely by you; rather, the intent is to ?exercise the right to control the distribution of derivative or &collective works based on the Program.FIn addition, mere aggregatio6 ge no more than yourA cost of physically performing source distribution, a complete A machine-readable copy of the corresponding source code, to be E distributed under the terms of Sections 1 and 2 above on a medium 2 customarily used for s6e Aanything that is normally distributed (in either source or binary Dform) with the major components (compiler, kernel, and so on) of theDoperating system on which the executable runs, unless that component"itself accompanies the executable.@If dis6ded that you also meet all of these conditions: C a) You must cause the modified files to carry prominent notices B stating that you changed the files and the date of any change.F b) You must cause any work that you distribute or publish, t6y print such an announcement, your work based on: the Program is not required to print an announcement.) =These requirements apply to the modified work as a whole. If Didentifiable sections of that work are not derived from the Program,Band can 6~n of another work not based on the ProgramEwith the Program (or with a work based on the Program) on a volume of Da storage or distribution medium does not bring the other work underthe scope of this License.D 3. You may copy and distribute the Pro6 Toftware interchange; or,E c) Accompany it with the information you received as to the offer B to distribute corresponding source code. (This alternative is? allowed only for noncommercial distribution and only if you D received the progr67 [=77 8ortion of this section is held invalid or unenforceable under Fany particular circumstance, the balance of the section is intended to>apply and the section as a whole is intended to apply in othercircumstances.CIt is not the purpose of this section 7Rgram is restricted in Ecertain countries either by patents or by copyrighted interfaces, the Coriginal copyright holder who places the Program under this License Bmay add an explicit geographical distribution limitation excludingCthose countries, so th7 D 5. You are not required to accept this License, since you have notDsigned it. However, nothing else grants you permission to modify orBdistribute the Program or its derivative works. These actions areCprohibited by law if you do not accept this Li7ent Dinfringement or for any other reason (not limited to patent issues),Cconditions are imposed on you (whether by court order, agreement or Fotherwise) that contradict the conditions of this License, they do not>excuse you from the conditions of this7 to induce you to infringe any Dpatents or other property right claims or to contest validity of any@such claims; this section has the sole purpose of protecting the * Copyright (C) H This program is free software; you can redistribute it and/or modifyH it under the terms of the GNU General Public License as published byE the Free Software Foun8EamGspecifies a version number of this License which applies to it and "any Ilater version", you have the option of following the terms and conditions Deither of that version or of any later version published by the FreeISoftware Foundation. If the Pro8TENT PERMITTED BY APPLICABLE LAW. EXCEPT WHENFOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIESJPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSEDDOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRA8 {E WITH ANY OTHEREPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES." END OF TERMS AND CONDITIONS 2 How to Apply These Terms to Your New ProgramsE If you develop a new program, and you 8 ldation; either version 2 of the License, or ' (at your option) any later version. C This program is distributed in the hope that it will be useful, B but WITHOUT ANY WARRANTY; without even the implied warranty ofA MERCHANTABILITY or FITNE8gram does not specify a version number of Lthis License, you may choose any version ever published by the Free Software Foundation. E 10. If you wish to incorporate parts of the Program into other free Iprograms whose distribution conditions are dif8,NTIES OFIMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS FTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THEHPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,REPAIR OR CORRECTION. 8 want it to be of the greatest Fpossible use to the public, the best way to achieve this is to make itKfree software which everyone can redistribute and change under these terms. F To do so, attach the following notices to the program. It is safestC8SS FOR A PARTICULAR PURPOSE. See the 0 GNU General Public License for more details.E You should have received a copy of the GNU General Public License ? along with this program; if not, write to the Free Software M Foundation, Inc., 51 F8ferent, write to the author Eto ask for permission. For software which is copyrighted by the Free HSoftware Foundation, write to the Free Software Foundation; we sometimesGmake exceptions for this. Our decision will be guided by the two goals Iof pre8K 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING CWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR JREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,KINCLUDING ANY GENERAL, SPECIAL8 to attach them to the start of each source file to most effectively Dconvey the exclusion of warranty; and each file should have at leastEthe "copyright" line and a pointer to where the full notice is found. K Gnom87 [=99 EL Quit 940 Quit: ! 950 DISP "Done!" 960 ENDP970 !:980 ! *** Main Program End990 !/1000 ! SUB Onedie(INTEGER Spots,OPTIONAL Erase)P;1010 ! Draw or erase the image of one die with rank given;1020 ! 'Spot9 dND(H*5/8,1)+1R1250 Corner=01260 END IF1270 IF (NPAR=2) THEN 81280 PEN -1 1290 ELSE1300 PEN 111310 END IF1320 IF Corner THEN N1330 IMOVE 0,2H1340 IDRAW 2,-21350 IDRAW W-4,0N1360 IDRAW 9 items--whatever suits your program.GYou should also get your employer (if you work as a programmer) or your Dschool, if any, to sign a "copyright disclaimer" for the program, if.necessary. Here is a sample; alter the names:H Yoyodyne, Inc., here9610 BEEP S620 J GOTO SpinI630 END SELECT!640 IF Olddie=Currdie THEN +650 BEEP i660 y GOTO Spinu670 END IF680 Cursor690 GOTO Spini700 Score: !710 Roll=1720 Lable(9 s'. If optional param Erase is present, erase:1030 ! the image by setting PEN -1.Otherwise, set PEN 1.;1040 ! This SUB relies on the calling context to position51050 ! the graphics cursor to the appropriate places1060 !.1070 SUB Onedie(INTEG92,2,1370 IDRAW 0,H-4N1380 IDRAW -2,21390 IDRAW -(W-4),01400 IDRAW -2,-2)1410 IDRAW 0,-(H-4)1420 IMOVE -0,-2- 1430 ELSE1440 IDRAW W,0-1450 IDRAW 0,H-1460 IDRAW -W,01470 IDRAW 0,-H149 by disclaims all copyright interest in the programJ `Gnomovision' (which makes passes at compilers) written by James Hacker.& , 1 April 1989 Ty Coon, President of ViceKThis General Public License does not permit incorporat9PO4)730 INTEGER Slot,Ret740 Slot=-1 750 WHILE Slot<0760  Scorecard0770  Slot=FNSelect_slot780  Ret=FNScore(Slot)t790  IF NOT Ret THEN 800 BEEP R810  Slot=0-ABS(Slot)820 9 ER Spots,OPTIONAL Erase)1080 OPTION BASE 1GP1090 INTEGER Cw,Ch,Qw,Qh,Tqw,Tqh ! Half, quarte and three-quarter dimensions61100 INTEGER Corner ! Flag whether to draw corners(1110 COM /Dimensions/ INTEGER W,H,Pad1120 Ch=H/21130 Cw980 END IF1490 SELECT Spots1500 CASE 11510 GOSUB Center1520 CASE 21530 GOSUB Upright)1540 GOSUB Lowleft)1550 CASE 31560 GOSUB Center1570 GOSUB Upright)1580 GOSUB Lowleft)1590 CASE 416009ovision version 69, Copyright (C) year name of authorM Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. A This is free software, and you are welcome to redistribute it 8 under certain conditions; type `show c' for deta9`ing your program into Gproprietary programs. If your program is a subroutine library, you may Kconsider it more useful to permit linking proprietary applications with the Elibrary. If this is what you want to do, use the GNU Library General 'Public L9nS END IF830 END WHILE0,840 IF Ret=1 THEN ! Score isn't final850  ScorecardE860  Final=0r870 ELSE880  Scorecard(1)890 M Final=1r900 END IF910 UNTIL Finalr920 Quit=1930 UNTI9 =W/21140 IF H>10 THEN n1150 Qw=W/4-11160 Qh=H/41170 Tqw=W*3/4N1180 Tqh=H*3/4+1n1190 Corner=1 1200 ELSE1210 Qw=DROUND(W/5,1)1220 Qh=DROUND(H/5,1)+11230 Tqw=DROUND(W*5/8,1)G1240 Tqh=DROU9)ils.KThe hypothetical commands `show w' and `show c' should show the appropriate Iparts of the General Public License. Of course, the commands you use may Hbe called something other than `show w' and `show c'; they could even be8mouse-clicks or menu9icense instead of this License. ublic License instead of this License. use the GNU Library General the $[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1] ~t 똃~tV,"YV,OYOK8\tV\Yt4 PVGYYYF u~t] V WHv97 [=::i1930 IMOVE Qw,Qh-1940 GOSUB Spot1950 IMOVE -Qw,-Qhq1960 RETURN Q1970 Upleft: !1980 IMOVE Qw,Tqh1990 GOSUB Spot2000 IMOVE -Qw,-Tqh2010 RETURN Q2020 Lowright: !2030 IMOVE Tqw,Qh2040 GOSUB Spot2050 IMOV:  Draw_cursor(FNStartx(New))-2370 Old=New ! NB:Changing Olddie/Currdieu 2380 SUBEND2390 !2400 ! FNStartx(INTEGER Die)L2410 ! Calculate and return the starting X coordinate of the current die.2420 !2430 DEF FNStartx(INTEGER Die)t: 2710 ELSE2720 IMOVE 0,-12730 IDRAW W,012740 IMOVE 0,112750 END IF 2760 SUBEND2770 ! 2780 ! SUB Toggle(INTEGER Die)?2790 ! Change the sign of the given die in the Dice() array.t@2800 ! If the die's value was pos:X,Y (3060 COM /Dimensions/ INTEGER W,H,Pad)3070 COM /Curr/ INTEGER Currdie,Olddieo3080 COM /Dice/ Dice(*)3090 INTEGER I/3100 FOR I=1 TO 53110 IF Dice(I)<0 THEN 3120 Currdie=INT(RND*6+1) 3130 MOVE (W+Pad)*(I-1):4 GOSUB Upleft1610 GOSUB Upright)1620 GOSUB Lowleft)1630 GOSUB Lowright1640 CASE 51650 GOSUB Upleft1660 GOSUB Uprightt1670 GOSUB Center1680 GOSUB Lowleftt1690 GOSUB Lowright1700 CASE 6:^E -Tqw,-Qh2060 RETURN T2070 Midleft: !T2080 IMOVE Qw,Ch-2090 GOSUB Spot2100 IMOVE -Qw,-Chh2110 RETURN Q2120 Midright: !2130 IMOVE Tqw,Ch2140 GOSUB Spot2150 IMOVE -Tqw,-Ch2160 RETURN T 2170 Spot: !N21:>2440 OPTION BASE 1T2450 COM /Bases/ INTEGER X,Yt(2460 COM /Dimensions/ INTEGER W,H,Pad 2470 RETURN X+(W+Pad)*(Die-1) 2480 FNENDU2490 !N-2500 ! SUB Draw_cursor(INTEGER X,OPTIONAL P) =2510 ! Draw the graphical cursor at the given X : itive, erase the die's image:2810 ! If the die's value was negative, draw the image.2820 !2830 SUB Toggle(INTEGER Die)w2840 OPTION BASE 1G"2850 COM /Bases/ INTEGER Hisx,Y2860 COM /Dice/ Dice(*)2870 INTEGER X/2880 X=FNStar:1710 GOSUB Upleft1720 GOSUB Midleftt1730 GOSUB Lowleftt1740 GOSUB Uprightt1750 GOSUB Midright1760 GOSUB Lowright1770 CASE ELSEo1780 BEEP S/1790 DISP "Die value out of range: ";Spotsc1800 END SE:80 IDRAW 0,-12190 IDRAW 1,012200 IDRAW 0,112210 IDRAW -1,02220 RETURN 12230 Exit:SUBEND2240 !i2250 ! SUB Cursor:2260 ! Draw a graphical "cursor" under the current die,82270 ! Erasing it from under the old current, if : coordinate.hD2520 ! If optional "P" parameter is given, change the PEN to that.2530 ! Otherwise, set PEN 1m2540 ! +2550 SUB Draw_cursor(INTEGER X,OPTIONAL P),2560 OPTION BASE 1("2570 COM /Bases/ INTEGER Hisx,Y(2580 COM /Dimensions/: itx(Die)(2890 MOVE X,Y2900 IF Dice(Die)>0 THEN "2910 Onedie(INT(Dice(Die)),1) 2920 ELSE2930 Onedie(-Dice(Die))2940 END IF2950 Dice(Die)=-Dice(Die) 2960 SUBEND2970 !2980 ! SUB Roll_dice;2990 ! For each die :jLECT1810 GOTO ExitT1820 Center: !1830 IMOVE Cw-1,Cha1840 GOSUB Spot1850 IMOVE -(Cw-1),-Ch 1860 RETURN (1870 Upright: !(1880 IMOVE Tqw,Tqh,1890 GOSUB Spot1900 IMOVE -Tqw,-TqhC1910 RETURN T1920 Lowleft: !T:any.H2280 ! Set Olddie (called "Old" here) to Currdie (called "New" here.)2290 ! 2300 SUB Cursor2310 OPTION BASE 1("2320 COM /Curr/ INTEGER New,Old2330 IF (Old) THEN '2340 Draw_cursor(FNStartx(Old),-1))2350 END IF"2360 : ~ INTEGER W,H,Pad2590 INTEGER Mypi2600 IF NPAR=2 THEN /2610 Myp=P= 2620 ELSE2630 Myp=1=2640 END IF2650 MOVE X,Y2660 PEN MypY2670 IF W>9 THEN 2680 IDRAW 0,-12690 IDRAW W,012700 IDRAW 0,11 :|in the Dice() array, if the currenti@3000 ! value is negative, replace it with a new random valueA3010 ! between 1 and 6. Set Currdie to 1 and draw the cursor.a3020 !3030 SUB Roll_dice13040 OPTION BASE 1a3050 COM /Bases/ INTEGER :7 [=;; Total$="**@")3760 END IF3770 IF Upper=0 THEN 3780 Upper$=" l") 3790 ELSE3800 Upper$=VAL$(Upper)3810 END IF3820 IF Lower=0 THEN 3830 Lower$=" 2") 3840 ELSE3850 Lower$=VAL$(Lower)38; ~4100 !4110 ! FNSelect_slotF4120 ! Choose a "slot" in the scorecard to fill with a score. SkipF4130 ! slots in the selection meny that already have a value. YATZA4140 ! is an exception. Allow a new score to go in that slot. 4150 !;int the scorecard.J3240 ! If the optional Final parameter is given, calculate and display3250 ! the grand total3260 !*3270 SUB Scorecard(OPTIONAL INTEGER Mode)3280 OPTION BASE 1P 3290 COM /Scorecard/ Score(*):3300 COM /Scoredi; IF NPAR=1 THEN ! We were given a mode3500 IF Mode=1 THEN Menu=1r 3510 IF Mode=2 THEN Final=13520 END IF3530 FOR I=1 TO 13H3540 IF Score(I)=-1 THEN 83550 Score$(I)=Underline$&" "&Enhance_off$3560 ELSE; !60 END IF3870 IF Bonus=0 THEN 3880 Bonus$=" ") 3890 ELSE3900 Bonus$=VAL$(Bonus)3910 END IF3920 OUTPUT 2;Clear_crt$;3930 PRINT Enhance_off$3940 PRINT TABXY(1,5)=3950 PRINT TAB(2);Inverse$&"YATZ16 Scor; 4160 DEF FNSelect_sloti4170 OPTION BASE 1o 4180 COM /Scorecard/ Score(*):4190 COM /Scoredisp/ Score$(13)[10],Score_name$(13)[15]y4200 COM /Crt/ Clear_crt$[2],Home$[2],Underline$[1],Inverse$[1],Blink$[1],Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhanc;sp/ Score$(13)[10],Score_name$(13)[15]y3310 COM /Crt/ Clear_crt$[2],Home$[2],Underline$[1],Inverse$[1],Blink$[1],Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1]73320 DIM Bonus$[10],Upper$[10],Lower$[10],Total$[10]I3330 Score_name$(1)="Ones"[33;3570 IF I<7 THEN "3580 Upper=Upper+Score(I)3590 ELSE"3600 Lower=Lower+Score(I)3610 END IF$3620 Score$(I)=VAL$(Score(I))3630 L=LEN(Score$(I))E3640 &Score$(I)=Underline$&RPT$(" ",8-L)&Sco; ecard"&Enhance_off$n3960 PRINT ""%3970 Fmt1:IMAGE 1X,18A,10A,4X,18A,10A 3980 Fmt2:IMAGE 31X,18A,10A43990 FOR I=1 TO 6P4000 PRINT USING Fmt1;Score_name$(I),Score$(I),Score_name$(I+6),Score$(I+6)4010 NEXT I34020 PRINT USING Fmt2;S;e_off$[1]4210 DIM Eligible(13),K$[2](4220 INTEGER I,J,Line,Col,E,Eptr,Maxe 4230 J=1E4240 FOR I=1 TO 13i4250 IF Score(I)=-1 THEN 4260 Eligible(J)=IT4270 J=J+1b4280 ELSE)4290 IF I=12 AND Score(I)<>0 ;40 Score_name$(2)="Twos"[3350 Score_name$(3)="Threes"03360 Score_name$(4)="Fours"3370 Score_name$(5)="Fives"3380 Score_name$(6)="Sixes"(3390 Score_name$(7)="Three of a Kind"'3400 Score_name$(8)="Four of a Kind""#3410 Scor;are$(I)&Enhance_off$i3650 END IF3660 NEXT I3670 IF Upper>=63 THEN 3680 Bonus=353690 Upper=Upper+Bonusl3700 END IF3710 IF Final THEN 3720 Total=Lower+Upperl3730 Total$=VAL$(Total) 3740 ELSE3750 ; core_name$(13),Score$(13),'4030 PRINT USING Fmt1;"Bonus",Bonus$)4040 PRINT ""B4050 PRINT USING Fmt1;"Upper Total",Upper$,"Lower Total",Lower$4060 Fmt3:IMAGE X,18A,10A"-4070 PRINT USING Fmt3;"Grand Total",Total$,4080 ! 4090 SUBEND; THEN U4300 Eligible(J)=124310 END IF4320 END IF4330 NEXT I4340 Eptr=14350 Maxe=J-14360 WHILE 114370 E=Eligible(Eptr)4380 IF E<7 THEN 4390 Line=7+E4400 Col=274410 ELSE44;,Y3140 Onedie(Currdie)-3150 Dice(I)=Currdie-3160 END IF3170 NEXT I3180 Currdie=1I3190 Cursor 3200 SUBEND3210 !.3220 ! SUB Scorecard(OPTIONAL INTEGER Final)C3230 ! Total the current Scores() array and pr;e_name$(9)="Full House"i(3420 Score_name$(10)="Small Straight"(3430 Score_name$(11)="Large Straight" 3440 Score_name$(12)="YATC!!""3450 Score_name$(13)="Chance??"#3460 INTEGER Menu,Final ! modesi3470 Menu=03480 Final=0 .3490;7 [=<&<nCol,Line);,4620 PRINT Enhance_off$&Score_name$(E);4630 SELECT K$[2]4640 CASE "V","<"4650 0Eptr=MAX(1,Eptr-1)4660 CASE "^",">"!4670 0Eptr=MIN(Maxe,Eptr+1)e4680 CASE "E"4690 RETURN E4700 END SE<(1:6) -4880 IF Slot<>12 AND Score(Slot)<>-1 THEN r4890 BEEP 110,.5N4900 RETURN 04910 END IF*4920 IF Slot=12 AND Score(Slot)=0 THEN 4930 BEEP 880,.5D4940 RETURN 04950 END IF4960 This_score=0 4970 !s7< F FOR I=1 TO 5/5240 *IF Frequency(Dice(I))>=Slot-4 THEN =5250 Got_minimum=1c5260 LEND IF5270 NEXT I+5280 This_score=This_score*Got_minimumH 5290 !s5300 CASE 9<5310 !  <5560 Streak=05570 jEND IF5580 NEXT I(5590 Streak=MAX(Streak,High_streak) 5600 IF Slot-Streak<9 THEN "5610 ,This_score=(Slot-7)*105620 ELSE5630 $This_score=05640 END IF 5650 ! 5660 <mLECT4710 END WHILEE 4720 FNEND 4730 ! FNScore(INTEGER Slot)O4740 ! Score the current roll. Enforce YATZ rules. Allow zeroing of a score$Q4750 ! only once. Allow a positive score to be entered into a slot only once,1N4760 ! Except < 4980 ! ]score calculationse 4990 ! 5000 SELECT Slot 5010 !E5020 CASE <7SN5030 ! O Upper half. Sum dice that match the current slot5040 FOR I=1 TO 5!5050 IF Dice(I)=Slo< h 9 == full house5320 GOSUB Sumall5330 INTEGER Got_3,Got_2 5340 FOR I=1 TO 6*5350 $IF Frequency(I)=3 THEN Got_3=1*5360 ZIF Frequency(I)=2 THEN Got_2=15370 NEXT I"5380 IF Got_2 AND Got_3 THEN 5390 Th<` CASE 12F65670 ! 12 == yatz! 5680 j! 5690 INTEGER Target,Yes5700 Target=Dice(1)5710 Yes=1t5720 FOR I=2 TO 5)5730 >IF Dice(I)<>Target THEN Yes=0 5740 NEXT I5750 IF<20 Line=E+14430 Col=324440 END IF 4450 PRINT TABXY(Col,Line);54460 PRINT Inverse$&Score_name$(E)&Enhance_off$;]4470 ON KBD GOTO Checkkey4480 Spin:GOTO SpinT4490 Checkkey:K$=KBD$ 4500 IF LEN(K$)<>2 THEN y<for YATZ, which can be entered as many times as it comes up,N4770 ! unless it is zeroed first. If and of these conditions are violated,O4780 ! BEEP and return 0. Detect when a score card is full, and return 2 ifeO4790 ! so. Otherwise return <t THEN e(5060 This_score=This_score+Slot5070 NEND IF5080 NEXT I-5090 IF This_score<3*Slot THEN ! Uh-oh 5100 WAIT 15110 BEEP 1440,.35120 BEEP 1200,.55130 "WAIT 15140 END IF 5150 < "is_score=25t5400 ELSE5410 $This_score=05420 END IF 5430 ! 5440 CASE 10,11@5450 !  10 == small straight@5460 ! % 11 == large straight$5470 INTE< 4510 BEEP K4520 ^GOTO Spin>4530 END IF4540 SELECT K$[2]"4550 CASE "<","V",">","^","E"4560 $OFF KBD"4570 CASE ELSE"4580 BEEP S4590 8GOTO Spin"4600 END SELECT 4610 PRINT TABXY(<1. Caller is responsible to ensure that Slot ise4800 ! between 1 and 13.4810 !4820 DEF FNScore(INTEGER Slot) 4830 !4840 OPTION BASE 1E 4850 COM /Scorecard/ Score(*)4860 COM /Dice/ Dice(*))4870 INTEGER This_score,Frequency< ) !N5160 CASE 7,8=5170 ! 7 == 3 of a kind =5180 ! /8 == 4 of a kind 5190 GOSUB Sumall 5200 D!U5210 INTEGER Got_minimum 5220 Got_minimum=0i5230 < mzGER Streak,High_streak5480 Streak=05490 High_streak=0k5500 GOSUB Sumall5510 FOR I=1 TO 6!5520 IF Frequency(I) THEN e5530 Streak=Streak+1H5540 ELSE15550 &High_streak=MAX(Streak,High_streak) <7 [=== PN=Oldphase6790 PEN -16800 GOSUB Rrre6810 RETURN r 6820 Score: !N 6830 PEN 1N6840 GOSUB Ssse6850 RETURN s6860 Unscore: !s6870 PEN -16880 GOSUB Ssse6890 RETURN s6900 Sss: !6910 MOVE Myx,Myy6920 == Yes THEN 5760 $This_score=50a5770 ELSE5780 This_score=0<5790 4! Can't zero Yatz unless it hasn't scored yet.K5800 D! Couldn't catch this before because we could have had Yatz..l"5810 IF Score(12)<>-1 THEN = Main exit point6080 IF Full THEN 6090 RETURN 2 6100 ELSE6110 RETURN 16120 END IF 6130 ! 6140 Sumall: !:6150 This_score=06160 FOR I=1 TO 66170 Frequency(I)=06180 NEXT I6190=j Oldphase=0 6460 SUBEND6470 SUB Lable(INTEGER Phase)6480 OPTION BASE 1E6490 COM /Bases/ INTEGER X,YR(6500 COM /Dimensions/ INTEGER W,H,Pad$6510 COM /Lable/ INTEGER Oldphase6520 INTEGER Myx,Myy,NE6530 Myx=5*(W+Pad)+2*Pad = LABEL "Enter Score"G6930 RETURN E 6940 Rrr: !N6950 MOVE Myx,Myy6960 LABEL "ROLL "&VAL$(N)S6970 RETURN R 6980 SUBENDnscore: !s6870 PEN -16880 GOSUB Ssse6890 RETURN s6900 Sss: !6910 MOVE Myx,Myy6920 =T5820 BEEP 220,.1>5830 RETURN 05840 END IF5850 END IF 5860 ! 5870 CASE 13F75880 ! +13 == Chanceo5890 GOSUB Sumall%5900 $! That's all for this one 85910 = FOR I=1 TO 5'6200 This_score=This_score+Dice(I)M16210 Frequency(Dice(I))=Frequency(Dice(I))+1p6220 NEXT I6230 RETURN e 6240 FNENDU6250 !6260 SUB Init_screeni6270 OPTION BASE 1iy6280 COM /Crt/ Clear_crt$[2],Home$[= 6540 Myy=Y+4W6550 MOVE Myx,Y+10+6560 SELECT Phase6570 CASE 1(6580 IF Oldphase THEN GOSUB Unscore6590 Oldphase=16600 GOSUB Roll6610 PEN 1 6620 CASE 2,36630 Oldphase=Phase-16640 GOSUB Unroll= =KEND SELECT ! Caller ensures input is in range. 5920 ! 65930 ! Apply Score5940 IF Slot<>12 THEN 5950 Score(Slot)=This_score 5960 ELSE*5970 IF Score(12)=-1 THEN Score(12)=0(5980 Score(=2],Underline$[1],Inverse$[1],Blink$[1],Ui$[1],Ub$[1],Bi$[1],Ubi$[1],Enhance_off$[1]$6290 COM /Lable/ INTEGER Oldphase%6300 Clear_crt$=CHR$(255)&CHR$(75)[6310 Enhance_off$=CHR$(128)6320 Inverse$=CHR$(129)6330 Blink$=CHR$(130)6340 = 6650 GOSUB Roll6660 CASE 46670 Oldphase=36680 GOSUB Unroll6690 GOSUB Scorel6700 END SELECT6710 SUBEXITE 6720 Roll: ! 6730 PEN 1I6740 N=PhaseE6750 GOSUB RrrT6760 RETURN r6770 Unroll: !6780 ==512)=Score(12)+This_score5990 END IFB6000 ! check for filled score card 6010 ! 6020 INTEGER Full6030 Full=16040 FOR I=1 TO 13 $6050 IF Score(I)=-1 THEN Full=06060 NEXT I66070 ! =D Bi$=CHR$(131)36350 Underline$=CHR$(132)6360 Ui$=CHR$(133)R6370 Ub$=CHR$(134)R6380 Ubi$=CHR$(135)6390 PRINTER IS 16400 CONTROL 2,1;0)6410 CONTROL 1,4;0)6420 OUTPUT 2;Clear_crt$; 6430 GINITT6440 GCLEAR6450=7 [=>4>>>> >7 [=>>> > >>> >>>> >????? ??? ? ???7 [=? ???? ?@q@@@@ @@@ @ @@@ @@@@ @@7 [=AAAAA AAA7 [=A A AAA AAAA ABcBBBB BBB B BBB BB7 [=BBB BCCCC7 [=CC CCC C CCC CCCC CDUDDDD DDD D D7 [=DDD DDDD DEEEEE EEE E EEE EEEE7 [=E E FF c&TѰ Q ` f )  " MNP:RZTzV 70`` eE$ =xl|5pTk ],r[[(_C$``j%@g2 1 @ l K Bϸ,@  Qp!A`@i43`` - -'P0bz0Elr!FL%c{r qRYɼ5ٻ@ [s;# e#$h r98"A=m`6hM1E8j&e'zH,mE/!\/-:,9Aa6RS- R FbmPTU]@w_Z]ZXCѐnT @6A?R;1C. Đ e Ϩ `UDOqdQrQ l艳!q}%GpPڊ}""0}8@#4 E !Spk`I0prƽ!7}d0 og@bf np`` V$"- n`'J2@daii!I Gq0>F [ nH'G@(y~ "p~xUt  6+iq{xs?W=A`f .ZDQx!OB@qAp0n"`ts8e0@=N`@nBKs ` hּbdRNf "_+sHfEc@X40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