Home » Personal collection » Acorn ADFS disks » Greaseweazled » adfs_EUG_55.adf » V/+CW2
V/+CW2
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn ADFS disks » Greaseweazled » adfs_EUG_55.adf |
Filename: | V/+CW2 |
Read OK: | ✔ |
File size: | 123D bytes |
Load address: | 2B204556 |
Exec address: | 45444F43 |
Duplicates
There are 3 duplicate copies of this file in the archive:
- AEW website » eug » eug_3_5_discs_Eug-55_A-EUG55.adf » V/+CW2
- AEW website » eug » eug_5_25_discs_Eug-55_D-EUG55.dsd » V.+CW2
- Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_55.ADF » V/+CW2
- Personal collection » Acorn ADFS disks » Greaseweazled » adfs_EUG_55.adf » V/+CW2
File contents
CODEWORD TECHINICAL INFORMATION Adding your own puzzles THE puzzles are arranged in a text file like so: GASKET PUMAS <--- 12 letters followed by carriage return L E R O A U INTEREST C N N P S EWERS TOSSES N R E O ENTRANT PROFUSE T * <--- note any character other than A-Z can be used to R T N GRIEVE separate words; here I have used * to make sure OTHER R N L the line is exactly 12 characters long. P S EXORCISE E A A I U G ROYAL DIRECT <carriage return> NEXT PUZZLE <--- Beginning of next puzzle and so on for all 10 puzzles. The default set of puzzles was arranged in VIEW. Memory Allocation CODEWORD uses its own set of Times-style fonts. These are user-defined graphics characters held in pages &9-C. The statement ?&367=15 sets bits 0-3 (i.e. 1+2+4+8) of the fonts flag at location &367 so that characters 224-255 (bit 0), 192-223 (bit 1), 160-191 (bit 2), and 128-159 (bit 3) can all be defined. The statement !&36B=&0C0B0A09 sets the values at &36B-E to &9-C, the PAGE number of where the character definitions are located. If the program finds itself running on a BBC Master, INKEY-256= 253, then the characters are peeked out of memory and defined with VDU23. The text file containing the puzzles is loaded in at &1100; the default set is called CWDATA1. BBC Master owners must therefore set PAGE to &1700 or higher to play CODEWORD. Main Procedures add Adds the letter L% to the grid, prints a blank at the appropriate position in the letter list. Correct co- ordinate given by (L% MOD 13,13+L% DIV 13). E.g. for the letter N, L%=13 so (L% MOD 13,13+L% DIV 13) = (0,14). Then prints letter at right position in number list, see line 520. Sets byte in 'plyd%' to L%+1 (because 0 in the array means that no letter has been assigned to that number). init Initialisation routine. Loads the fonts and text file (see text). mssg(A$) Prints the string A$ in the special font at the centre of the screen. number(X%, Prints number A% at (X%,Y%) in small font. Note Y%,A%) how correct graphics char given for each digit, e.g. for A%=12, 232+12 DIV 10 = 233; 232+12 MOD 10 = 234. CHR$232 is start of the 'small number' fonts. PLOT 0,-16,0 backspaces half a character back in VDU5 play Prompts the player to a letter and number. String A$ should contain something like A01, in which case N%=1, and L%=0. Function FNokay will return FALSE if it's anything different. Adds (if N%>0) or takes away (N%=-1=TRUE, the result of doing ASCLEFT$(A$,1) when A$="") the letter from the grid. screen Shuffles the letters, draws the grid lines, prints CODEWORD title, prints list of digits on the right hand side. Puts the numbers on the grid, and chooses some letters to start the player off. shuffle Chooses the numbers to which the letters are assigned. First arrange numbers 1-26 in random order in 'playd%'. Then fill grid with numbers that correspond to the letters given in the puzzle in the text file, e.g. value in playd%?1 is the number assigned to the letter B. sub Subtracts letter from grid, prints blank in number list and restores letter to right position in letter list (see notes on PROCadd). tile(X%, Prints letter A% in big font at (X%,Y%), where A%=1 for A, Y%,A%) A%=2 for B etc. excepting special case where A%=0 and blank square printed. Correct group of 2x2 characters worked out from 124+A%*4. E.g. for letter B, 124+A%*4 = 124+2*4 = 32. Functions lett(L%) Finds the number assigned to letter L% by searching the 'playd%' array. If it's in there, function will return with 0-25; if it isn't, function will return with 26. okay Checks string typed in by player. If A$="" then they pressed <RETURN> so end procedure with FNsolvd. If length of string is more than 3, or letter isn't A-Z then player mistyped. If the string is OK, then check to see that letter hasn't already been played. solvd Checks player's solution against actual answer. C% set to TRUE to begin with, then if any letter in the player's grid doesn't match, function will end with C%=FALSE. Chris Dewhurst, EUG #55
00000000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000010 20 20 20 20 43 4f 44 45 57 4f 52 44 20 54 45 43 | CODEWORD TEC| 00000020 48 49 4e 49 43 41 4c 20 49 4e 46 4f 52 4d 41 54 |HINICAL INFORMAT| 00000030 49 4f 4e 0d 0d 41 64 64 69 6e 67 20 79 6f 75 72 |ION..Adding your| 00000040 20 6f 77 6e 20 70 75 7a 7a 6c 65 73 0d 54 48 45 | own puzzles.THE| 00000050 20 70 75 7a 7a 6c 65 73 20 61 72 65 20 61 72 72 | puzzles are arr| 00000060 61 6e 67 65 64 20 69 6e 20 61 20 74 65 78 74 20 |anged in a text | 00000070 66 69 6c 65 20 6c 69 6b 65 20 73 6f 3a 0d 0d 47 |file like so:..G| 00000080 41 53 4b 45 54 20 50 55 4d 41 53 20 20 20 3c 2d |ASKET PUMAS <-| 00000090 2d 2d 20 20 20 20 31 32 20 6c 65 74 74 65 72 73 |-- 12 letters| 000000a0 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 63 61 72 | followed by car| 000000b0 72 69 61 67 65 20 72 65 74 75 72 6e 0d 4c 20 20 |riage return.L | 000000c0 45 20 52 20 4f 20 41 20 55 0d 49 4e 54 45 52 45 |E R O A U.INTERE| 000000d0 53 54 20 43 20 4e 0d 4e 20 20 50 20 53 20 45 57 |ST C N.N P S EW| 000000e0 45 52 53 0d 54 4f 53 53 45 53 20 4e 20 52 20 45 |ERS.TOSSES N R E| 000000f0 0d 20 20 4f 20 20 45 4e 54 52 41 4e 54 0d 50 52 |. O ENTRANT.PR| 00000100 4f 46 55 53 45 20 20 54 20 2a 20 20 20 3c 2d 2d |OFUSE T * <--| 00000110 2d 20 20 20 20 6e 6f 74 65 20 61 6e 79 20 63 68 |- note any ch| 00000120 61 72 61 63 74 65 72 20 6f 74 68 65 72 20 74 68 |aracter other th| 00000130 61 6e 20 41 2d 5a 20 63 61 6e 20 62 65 20 75 73 |an A-Z can be us| 00000140 65 64 20 74 6f 0d 52 20 54 20 4e 20 47 52 49 45 |ed to.R T N GRIE| 00000150 56 45 20 20 20 20 20 20 20 20 20 20 20 73 65 70 |VE sep| 00000160 61 72 61 74 65 20 77 6f 72 64 73 3b 20 68 65 72 |arate words; her| 00000170 65 20 49 20 68 61 76 65 20 75 73 65 64 20 2a 20 |e I have used * | 00000180 74 6f 20 6d 61 6b 65 20 73 75 72 65 0d 4f 54 48 |to make sure.OTH| 00000190 45 52 20 52 20 4e 20 20 4c 20 20 20 20 20 20 20 |ER R N L | 000001a0 20 20 20 20 74 68 65 20 6c 69 6e 65 20 69 73 20 | the line is | 000001b0 65 78 61 63 74 6c 79 20 31 32 20 63 68 61 72 61 |exactly 12 chara| 000001c0 63 74 65 72 73 20 6c 6f 6e 67 2e 0d 50 20 53 20 |cters long..P S | 000001d0 45 58 4f 52 43 49 53 45 0d 45 20 41 20 41 20 49 |EXORCISE.E A A I| 000001e0 20 55 20 20 47 0d 52 4f 59 41 4c 20 44 49 52 45 | U G.ROYAL DIRE| 000001f0 43 54 0d 3c 63 61 72 72 69 61 67 65 20 72 65 74 |CT.<carriage ret| 00000200 75 72 6e 3e 0d 4e 45 58 54 20 50 55 5a 5a 4c 45 |urn>.NEXT PUZZLE| 00000210 20 20 20 20 3c 2d 2d 2d 20 20 20 20 42 65 67 69 | <--- Begi| 00000220 6e 6e 69 6e 67 20 6f 66 20 6e 65 78 74 20 70 75 |nning of next pu| 00000230 7a 7a 6c 65 0d 0d 61 6e 64 20 73 6f 20 6f 6e 20 |zzle..and so on | 00000240 66 6f 72 20 61 6c 6c 20 31 30 20 70 75 7a 7a 6c |for all 10 puzzl| 00000250 65 73 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 |es. The default | 00000260 73 65 74 20 6f 66 20 70 75 7a 7a 6c 65 73 20 77 |set of puzzles w| 00000270 61 73 20 61 72 72 61 6e 67 65 64 20 69 6e 0d 56 |as arranged in.V| 00000280 49 45 57 2e 0d 0d 4d 65 6d 6f 72 79 20 41 6c 6c |IEW...Memory All| 00000290 6f 63 61 74 69 6f 6e 0d 43 4f 44 45 57 4f 52 44 |ocation.CODEWORD| 000002a0 20 75 73 65 73 20 69 74 73 20 6f 77 6e 20 73 65 | uses its own se| 000002b0 74 20 6f 66 20 54 69 6d 65 73 2d 73 74 79 6c 65 |t of Times-style| 000002c0 20 66 6f 6e 74 73 2e 20 54 68 65 73 65 20 61 72 | fonts. These ar| 000002d0 65 20 75 73 65 72 2d 64 65 66 69 6e 65 64 0d 67 |e user-defined.g| 000002e0 72 61 70 68 69 63 73 20 63 68 61 72 61 63 74 65 |raphics characte| 000002f0 72 73 20 68 65 6c 64 20 69 6e 20 70 61 67 65 73 |rs held in pages| 00000300 20 26 39 2d 43 2e 20 54 68 65 20 73 74 61 74 65 | &9-C. The state| 00000310 6d 65 6e 74 20 3f 26 33 36 37 3d 31 35 20 73 65 |ment ?&367=15 se| 00000320 74 73 20 62 69 74 73 0d 30 2d 33 20 28 69 2e 65 |ts bits.0-3 (i.e| 00000330 2e 20 31 2b 32 2b 34 2b 38 29 20 6f 66 20 74 68 |. 1+2+4+8) of th| 00000340 65 20 66 6f 6e 74 73 20 66 6c 61 67 20 61 74 20 |e fonts flag at | 00000350 6c 6f 63 61 74 69 6f 6e 20 26 33 36 37 20 73 6f |location &367 so| 00000360 20 74 68 61 74 20 63 68 61 72 61 63 74 65 72 73 | that characters| 00000370 0d 32 32 34 2d 32 35 35 20 28 62 69 74 20 30 29 |.224-255 (bit 0)| 00000380 2c 20 31 39 32 2d 32 32 33 20 28 62 69 74 20 31 |, 192-223 (bit 1| 00000390 29 2c 20 31 36 30 2d 31 39 31 20 28 62 69 74 20 |), 160-191 (bit | 000003a0 32 29 2c 20 61 6e 64 20 31 32 38 2d 31 35 39 20 |2), and 128-159 | 000003b0 28 62 69 74 20 33 29 20 0d 63 61 6e 20 61 6c 6c |(bit 3) .can all| 000003c0 20 62 65 20 64 65 66 69 6e 65 64 2e 20 54 68 65 | be defined. The| 000003d0 20 73 74 61 74 65 6d 65 6e 74 20 21 26 33 36 42 | statement !&36B| 000003e0 3d 26 30 43 30 42 30 41 30 39 20 73 65 74 73 20 |=&0C0B0A09 sets | 000003f0 74 68 65 20 76 61 6c 75 65 73 20 61 74 0d 26 33 |the values at.&3| 00000400 36 42 2d 45 20 74 6f 20 26 39 2d 43 2c 20 74 68 |6B-E to &9-C, th| 00000410 65 20 50 41 47 45 20 6e 75 6d 62 65 72 20 6f 66 |e PAGE number of| 00000420 20 77 68 65 72 65 20 74 68 65 20 63 68 61 72 61 | where the chara| 00000430 63 74 65 72 20 64 65 66 69 6e 69 74 69 6f 6e 73 |cter definitions| 00000440 20 61 72 65 0d 6c 6f 63 61 74 65 64 2e 20 49 66 | are.located. If| 00000450 20 74 68 65 20 70 72 6f 67 72 61 6d 20 66 69 6e | the program fin| 00000460 64 73 20 69 74 73 65 6c 66 20 72 75 6e 6e 69 6e |ds itself runnin| 00000470 67 20 6f 6e 20 61 20 42 42 43 20 4d 61 73 74 65 |g on a BBC Maste| 00000480 72 2c 20 49 4e 4b 45 59 2d 32 35 36 3d 0d 32 35 |r, INKEY-256=.25| 00000490 33 2c 20 74 68 65 6e 20 74 68 65 20 63 68 61 72 |3, then the char| 000004a0 61 63 74 65 72 73 20 61 72 65 20 70 65 65 6b 65 |acters are peeke| 000004b0 64 20 6f 75 74 20 6f 66 20 6d 65 6d 6f 72 79 20 |d out of memory | 000004c0 61 6e 64 20 64 65 66 69 6e 65 64 20 77 69 74 68 |and defined with| 000004d0 20 0d 56 44 55 32 33 2e 0d 20 20 20 54 68 65 20 | .VDU23.. The | 000004e0 74 65 78 74 20 66 69 6c 65 20 63 6f 6e 74 61 69 |text file contai| 000004f0 6e 69 6e 67 20 74 68 65 20 70 75 7a 7a 6c 65 73 |ning the puzzles| 00000500 20 69 73 20 6c 6f 61 64 65 64 20 69 6e 20 61 74 | is loaded in at| 00000510 20 26 31 31 30 30 3b 20 74 68 65 20 0d 64 65 66 | &1100; the .def| 00000520 61 75 6c 74 20 73 65 74 20 69 73 20 63 61 6c 6c |ault set is call| 00000530 65 64 20 43 57 44 41 54 41 31 2e 20 42 42 43 20 |ed CWDATA1. BBC | 00000540 4d 61 73 74 65 72 20 6f 77 6e 65 72 73 20 6d 75 |Master owners mu| 00000550 73 74 20 74 68 65 72 65 66 6f 72 65 20 73 65 74 |st therefore set| 00000560 20 50 41 47 45 0d 74 6f 20 26 31 37 30 30 20 6f | PAGE.to &1700 o| 00000570 72 20 68 69 67 68 65 72 20 74 6f 20 70 6c 61 79 |r higher to play| 00000580 20 43 4f 44 45 57 4f 52 44 2e 0d 0d 4d 61 69 6e | CODEWORD...Main| 00000590 20 50 72 6f 63 65 64 75 72 65 73 0d 61 64 64 20 | Procedures.add | 000005a0 20 20 20 20 20 20 20 20 20 41 64 64 73 20 74 68 | Adds th| 000005b0 65 20 6c 65 74 74 65 72 20 4c 25 20 74 6f 20 74 |e letter L% to t| 000005c0 68 65 20 67 72 69 64 2c 20 70 72 69 6e 74 73 20 |he grid, prints | 000005d0 61 20 62 6c 61 6e 6b 20 61 74 20 74 68 65 0d 20 |a blank at the. | 000005e0 20 20 20 20 20 20 20 20 20 20 20 20 61 70 70 72 | appr| 000005f0 6f 70 72 69 61 74 65 20 70 6f 73 69 74 69 6f 6e |opriate position| 00000600 20 69 6e 20 74 68 65 20 6c 65 74 74 65 72 20 6c | in the letter l| 00000610 69 73 74 2e 20 43 6f 72 72 65 63 74 20 63 6f 2d |ist. Correct co-| 00000620 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 72 |. or| 00000630 64 69 6e 61 74 65 20 67 69 76 65 6e 20 62 79 20 |dinate given by | 00000640 28 4c 25 20 4d 4f 44 20 31 33 2c 31 33 2b 4c 25 |(L% MOD 13,13+L%| 00000650 20 44 49 56 20 31 33 29 2e 20 45 2e 67 2e 20 66 | DIV 13). E.g. f| 00000660 6f 72 20 74 68 65 0d 20 20 20 20 20 20 20 20 20 |or the. | 00000670 20 20 20 20 6c 65 74 74 65 72 20 4e 2c 20 4c 25 | letter N, L%| 00000680 3d 31 33 20 73 6f 20 28 4c 25 20 4d 4f 44 20 31 |=13 so (L% MOD 1| 00000690 33 2c 31 33 2b 4c 25 20 44 49 56 20 31 33 29 20 |3,13+L% DIV 13) | 000006a0 3d 20 28 30 2c 31 34 29 2e 20 54 68 65 6e 0d 20 |= (0,14). Then. | 000006b0 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 6e | prin| 000006c0 74 73 20 6c 65 74 74 65 72 20 61 74 20 72 69 67 |ts letter at rig| 000006d0 68 74 20 70 6f 73 69 74 69 6f 6e 20 69 6e 20 6e |ht position in n| 000006e0 75 6d 62 65 72 20 6c 69 73 74 2c 20 73 65 65 20 |umber list, see | 000006f0 6c 69 6e 65 0d 20 20 20 20 20 20 20 20 20 20 20 |line. | 00000700 20 20 35 32 30 2e 20 53 65 74 73 20 62 79 74 65 | 520. Sets byte| 00000710 20 69 6e 20 27 70 6c 79 64 25 27 20 74 6f 20 4c | in 'plyd%' to L| 00000720 25 2b 31 20 28 62 65 63 61 75 73 65 20 30 20 69 |%+1 (because 0 i| 00000730 6e 20 74 68 65 20 61 72 72 61 79 0d 20 20 20 20 |n the array. | 00000740 20 20 20 20 20 20 20 20 20 6d 65 61 6e 73 20 74 | means t| 00000750 68 61 74 20 6e 6f 20 6c 65 74 74 65 72 20 68 61 |hat no letter ha| 00000760 73 20 62 65 65 6e 20 61 73 73 69 67 6e 65 64 20 |s been assigned | 00000770 74 6f 20 74 68 61 74 20 6e 75 6d 62 65 72 29 2e |to that number).| 00000780 0d 0d 69 6e 69 74 20 20 20 20 20 20 20 20 20 49 |..init I| 00000790 6e 69 74 69 61 6c 69 73 61 74 69 6f 6e 20 72 6f |nitialisation ro| 000007a0 75 74 69 6e 65 2e 20 4c 6f 61 64 73 20 74 68 65 |utine. Loads the| 000007b0 20 66 6f 6e 74 73 20 61 6e 64 20 74 65 78 74 20 | fonts and text | 000007c0 66 69 6c 65 20 28 73 65 65 0d 20 20 20 20 20 20 |file (see. | 000007d0 20 20 20 20 20 20 20 74 65 78 74 29 2e 0d 0d 6d | text)...m| 000007e0 73 73 67 28 41 24 29 20 20 20 20 20 50 72 69 6e |ssg(A$) Prin| 000007f0 74 73 20 74 68 65 20 73 74 72 69 6e 67 20 41 24 |ts the string A$| 00000800 20 69 6e 20 74 68 65 20 73 70 65 63 69 61 6c 20 | in the special | 00000810 66 6f 6e 74 20 61 74 20 74 68 65 20 63 65 6e 74 |font at the cent| 00000820 72 65 20 6f 66 0d 20 20 20 20 20 20 20 20 20 20 |re of. | 00000830 20 20 20 74 68 65 20 73 63 72 65 65 6e 2e 0d 0d | the screen...| 00000840 6e 75 6d 62 65 72 28 58 25 2c 20 20 20 50 72 69 |number(X%, Pri| 00000850 6e 74 73 20 6e 75 6d 62 65 72 20 41 25 20 61 74 |nts number A% at| 00000860 20 28 58 25 2c 59 25 29 20 69 6e 20 73 6d 61 6c | (X%,Y%) in smal| 00000870 6c 20 66 6f 6e 74 2e 20 4e 6f 74 65 0d 59 25 2c |l font. Note.Y%,| 00000880 41 25 29 20 20 20 20 20 20 20 68 6f 77 20 63 6f |A%) how co| 00000890 72 72 65 63 74 20 67 72 61 70 68 69 63 73 20 63 |rrect graphics c| 000008a0 68 61 72 20 67 69 76 65 6e 20 66 6f 72 20 65 61 |har given for ea| 000008b0 63 68 20 64 69 67 69 74 2c 20 65 2e 67 2e 20 66 |ch digit, e.g. f| 000008c0 6f 72 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |or. | 000008d0 41 25 3d 31 32 2c 20 32 33 32 2b 31 32 20 44 49 |A%=12, 232+12 DI| 000008e0 56 20 31 30 20 3d 20 32 33 33 3b 20 32 33 32 2b |V 10 = 233; 232+| 000008f0 31 32 20 4d 4f 44 20 31 30 20 3d 20 32 33 34 2e |12 MOD 10 = 234.| 00000900 20 43 48 52 24 32 33 32 20 69 73 0d 20 20 20 20 | CHR$232 is. | 00000910 20 20 20 20 20 20 20 20 20 73 74 61 72 74 20 6f | start o| 00000920 66 20 74 68 65 20 27 73 6d 61 6c 6c 20 6e 75 6d |f the 'small num| 00000930 62 65 72 27 20 66 6f 6e 74 73 2e 20 50 4c 4f 54 |ber' fonts. PLOT| 00000940 20 30 2c 2d 31 36 2c 30 20 62 61 63 6b 73 70 61 | 0,-16,0 backspa| 00000950 63 65 73 0d 20 20 20 20 20 20 20 20 20 20 20 20 |ces. | 00000960 20 68 61 6c 66 20 61 20 63 68 61 72 61 63 74 65 | half a characte| 00000970 72 20 62 61 63 6b 20 69 6e 20 56 44 55 35 0d 0d |r back in VDU5..| 00000980 70 6c 61 79 20 20 20 20 20 20 20 20 20 50 72 6f |play Pro| 00000990 6d 70 74 73 20 74 68 65 20 70 6c 61 79 65 72 20 |mpts the player | 000009a0 74 6f 20 61 20 6c 65 74 74 65 72 20 61 6e 64 20 |to a letter and | 000009b0 6e 75 6d 62 65 72 2e 20 53 74 72 69 6e 67 20 41 |number. String A| 000009c0 24 20 73 68 6f 75 6c 64 0d 20 20 20 20 20 20 20 |$ should. | 000009d0 20 20 20 20 20 20 63 6f 6e 74 61 69 6e 20 73 6f | contain so| 000009e0 6d 65 74 68 69 6e 67 20 6c 69 6b 65 20 41 30 31 |mething like A01| 000009f0 2c 20 69 6e 20 77 68 69 63 68 20 63 61 73 65 20 |, in which case | 00000a00 4e 25 3d 31 2c 20 61 6e 64 20 4c 25 3d 30 2e 0d |N%=1, and L%=0..| 00000a10 20 20 20 20 20 20 20 20 20 20 20 20 20 46 75 6e | Fun| 00000a20 63 74 69 6f 6e 20 46 4e 6f 6b 61 79 20 77 69 6c |ction FNokay wil| 00000a30 6c 20 72 65 74 75 72 6e 20 46 41 4c 53 45 20 69 |l return FALSE i| 00000a40 66 20 69 74 27 73 20 61 6e 79 74 68 69 6e 67 0d |f it's anything.| 00000a50 20 20 20 20 20 20 20 20 20 20 20 20 20 64 69 66 | dif| 00000a60 66 65 72 65 6e 74 2e 20 41 64 64 73 20 28 69 66 |ferent. Adds (if| 00000a70 20 4e 25 3e 30 29 20 6f 72 20 74 61 6b 65 73 20 | N%>0) or takes | 00000a80 61 77 61 79 20 28 4e 25 3d 2d 31 3d 54 52 55 45 |away (N%=-1=TRUE| 00000a90 2c 20 74 68 65 0d 20 20 20 20 20 20 20 20 20 20 |, the. | 00000aa0 20 20 20 72 65 73 75 6c 74 20 6f 66 20 64 6f 69 | result of doi| 00000ab0 6e 67 20 41 53 43 4c 45 46 54 24 28 41 24 2c 31 |ng ASCLEFT$(A$,1| 00000ac0 29 20 77 68 65 6e 20 41 24 3d 22 22 29 20 74 68 |) when A$="") th| 00000ad0 65 20 6c 65 74 74 65 72 20 66 72 6f 6d 0d 20 20 |e letter from. | 00000ae0 20 20 20 20 20 20 20 20 20 20 20 74 68 65 20 67 | the g| 00000af0 72 69 64 2e 0d 0d 73 63 72 65 65 6e 20 20 20 20 |rid...screen | 00000b00 20 20 20 53 68 75 66 66 6c 65 73 20 74 68 65 20 | Shuffles the | 00000b10 6c 65 74 74 65 72 73 2c 20 64 72 61 77 73 20 74 |letters, draws t| 00000b20 68 65 20 67 72 69 64 20 6c 69 6e 65 73 2c 20 70 |he grid lines, p| 00000b30 72 69 6e 74 73 20 43 4f 44 45 57 4f 52 44 0d 20 |rints CODEWORD. | 00000b40 20 20 20 20 20 20 20 20 20 20 20 20 74 69 74 6c | titl| 00000b50 65 2c 20 70 72 69 6e 74 73 20 6c 69 73 74 20 6f |e, prints list o| 00000b60 66 20 64 69 67 69 74 73 20 6f 6e 20 74 68 65 20 |f digits on the | 00000b70 72 69 67 68 74 20 68 61 6e 64 20 73 69 64 65 2e |right hand side.| 00000b80 20 50 75 74 73 0d 20 20 20 20 20 20 20 20 20 20 | Puts. | 00000b90 20 20 20 74 68 65 20 6e 75 6d 62 65 72 73 20 6f | the numbers o| 00000ba0 6e 20 74 68 65 20 67 72 69 64 2c 20 61 6e 64 20 |n the grid, and | 00000bb0 63 68 6f 6f 73 65 73 20 73 6f 6d 65 20 6c 65 74 |chooses some let| 00000bc0 74 65 72 73 20 74 6f 20 73 74 61 72 74 0d 20 20 |ters to start. | 00000bd0 20 20 20 20 20 20 20 20 20 20 20 74 68 65 20 70 | the p| 00000be0 6c 61 79 65 72 20 6f 66 66 2e 0d 0d 73 68 75 66 |layer off...shuf| 00000bf0 66 6c 65 20 20 20 20 20 20 43 68 6f 6f 73 65 73 |fle Chooses| 00000c00 20 74 68 65 20 6e 75 6d 62 65 72 73 20 74 6f 20 | the numbers to | 00000c10 77 68 69 63 68 20 74 68 65 20 6c 65 74 74 65 72 |which the letter| 00000c20 73 20 61 72 65 20 61 73 73 69 67 6e 65 64 2e 0d |s are assigned..| 00000c30 20 20 20 20 20 20 20 20 20 20 20 20 20 46 69 72 | Fir| 00000c40 73 74 20 61 72 72 61 6e 67 65 20 6e 75 6d 62 65 |st arrange numbe| 00000c50 72 73 20 31 2d 32 36 20 69 6e 20 72 61 6e 64 6f |rs 1-26 in rando| 00000c60 6d 20 6f 72 64 65 72 20 69 6e 20 27 70 6c 61 79 |m order in 'play| 00000c70 64 25 27 2e 0d 20 20 20 20 20 20 20 20 20 20 20 |d%'.. | 00000c80 20 20 54 68 65 6e 20 66 69 6c 6c 20 67 72 69 64 | Then fill grid| 00000c90 20 77 69 74 68 20 6e 75 6d 62 65 72 73 20 74 68 | with numbers th| 00000ca0 61 74 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f |at correspond to| 00000cb0 20 74 68 65 20 6c 65 74 74 65 72 73 0d 20 20 20 | the letters. | 00000cc0 20 20 20 20 20 20 20 20 20 20 67 69 76 65 6e 20 | given | 00000cd0 69 6e 20 74 68 65 20 70 75 7a 7a 6c 65 20 69 6e |in the puzzle in| 00000ce0 20 74 68 65 20 74 65 78 74 20 66 69 6c 65 2c 20 | the text file, | 00000cf0 65 2e 67 2e 20 76 61 6c 75 65 20 69 6e 0d 20 20 |e.g. value in. | 00000d00 20 20 20 20 20 20 20 20 20 20 20 70 6c 61 79 64 | playd| 00000d10 25 3f 31 20 69 73 20 74 68 65 20 6e 75 6d 62 65 |%?1 is the numbe| 00000d20 72 20 61 73 73 69 67 6e 65 64 20 74 6f 20 74 68 |r assigned to th| 00000d30 65 20 6c 65 74 74 65 72 20 42 2e 0d 0d 73 75 62 |e letter B...sub| 00000d40 20 20 20 20 20 20 20 20 20 20 53 75 62 74 72 61 | Subtra| 00000d50 63 74 73 20 6c 65 74 74 65 72 20 66 72 6f 6d 20 |cts letter from | 00000d60 67 72 69 64 2c 20 70 72 69 6e 74 73 20 62 6c 61 |grid, prints bla| 00000d70 6e 6b 20 69 6e 20 6e 75 6d 62 65 72 20 6c 69 73 |nk in number lis| 00000d80 74 20 61 6e 64 0d 20 20 20 20 20 20 20 20 20 20 |t and. | 00000d90 20 20 20 72 65 73 74 6f 72 65 73 20 6c 65 74 74 | restores lett| 00000da0 65 72 20 74 6f 20 72 69 67 68 74 20 70 6f 73 69 |er to right posi| 00000db0 74 69 6f 6e 20 69 6e 20 6c 65 74 74 65 72 20 6c |tion in letter l| 00000dc0 69 73 74 20 28 73 65 65 20 6e 6f 74 65 73 0d 20 |ist (see notes. | 00000dd0 20 20 20 20 20 20 20 20 20 20 20 20 6f 6e 20 50 | on P| 00000de0 52 4f 43 61 64 64 29 2e 0d 0d 74 69 6c 65 28 58 |ROCadd)...tile(X| 00000df0 25 2c 20 20 20 20 20 50 72 69 6e 74 73 20 6c 65 |%, Prints le| 00000e00 74 74 65 72 20 41 25 20 69 6e 20 62 69 67 20 66 |tter A% in big f| 00000e10 6f 6e 74 20 61 74 20 28 58 25 2c 59 25 29 2c 20 |ont at (X%,Y%), | 00000e20 77 68 65 72 65 20 41 25 3d 31 20 66 6f 72 20 41 |where A%=1 for A| 00000e30 2c 0d 59 25 2c 41 25 29 20 20 20 20 20 20 20 41 |,.Y%,A%) A| 00000e40 25 3d 32 20 66 6f 72 20 42 20 65 74 63 2e 20 65 |%=2 for B etc. e| 00000e50 78 63 65 70 74 69 6e 67 20 73 70 65 63 69 61 6c |xcepting special| 00000e60 20 63 61 73 65 20 77 68 65 72 65 20 41 25 3d 30 | case where A%=0| 00000e70 20 61 6e 64 20 62 6c 61 6e 6b 0d 20 20 20 20 20 | and blank. | 00000e80 20 20 20 20 20 20 20 20 73 71 75 61 72 65 20 70 | square p| 00000e90 72 69 6e 74 65 64 2e 20 43 6f 72 72 65 63 74 20 |rinted. Correct | 00000ea0 67 72 6f 75 70 20 6f 66 20 32 78 32 20 63 68 61 |group of 2x2 cha| 00000eb0 72 61 63 74 65 72 73 20 77 6f 72 6b 65 64 20 6f |racters worked o| 00000ec0 75 74 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |ut. | 00000ed0 66 72 6f 6d 20 31 32 34 2b 41 25 2a 34 2e 20 45 |from 124+A%*4. E| 00000ee0 2e 67 2e 20 66 6f 72 20 6c 65 74 74 65 72 20 42 |.g. for letter B| 00000ef0 2c 20 31 32 34 2b 41 25 2a 34 20 3d 20 31 32 34 |, 124+A%*4 = 124| 00000f00 2b 32 2a 34 20 3d 20 33 32 2e 0d 0d 46 75 6e 63 |+2*4 = 32...Func| 00000f10 74 69 6f 6e 73 0d 6c 65 74 74 28 4c 25 29 20 20 |tions.lett(L%) | 00000f20 20 20 20 46 69 6e 64 73 20 74 68 65 20 6e 75 6d | Finds the num| 00000f30 62 65 72 20 61 73 73 69 67 6e 65 64 20 74 6f 20 |ber assigned to | 00000f40 6c 65 74 74 65 72 20 4c 25 20 62 79 20 73 65 61 |letter L% by sea| 00000f50 72 63 68 69 6e 67 20 74 68 65 0d 20 20 20 20 20 |rching the. | 00000f60 20 20 20 20 20 20 20 20 27 70 6c 61 79 64 25 27 | 'playd%'| 00000f70 20 61 72 72 61 79 2e 20 49 66 20 69 74 27 73 20 | array. If it's | 00000f80 69 6e 20 74 68 65 72 65 2c 20 66 75 6e 63 74 69 |in there, functi| 00000f90 6f 6e 20 77 69 6c 6c 20 72 65 74 75 72 6e 20 77 |on will return w| 00000fa0 69 74 68 0d 20 20 20 20 20 20 20 20 20 20 20 20 |ith. | 00000fb0 20 30 2d 32 35 3b 20 69 66 20 69 74 20 69 73 6e | 0-25; if it isn| 00000fc0 27 74 2c 20 66 75 6e 63 74 69 6f 6e 20 77 69 6c |'t, function wil| 00000fd0 6c 20 72 65 74 75 72 6e 20 77 69 74 68 20 32 36 |l return with 26| 00000fe0 2e 0d 0d 6f 6b 61 79 20 20 20 20 20 20 20 20 20 |...okay | 00000ff0 43 68 65 63 6b 73 20 73 74 72 69 6e 67 20 74 79 |Checks string ty| 00001000 70 65 64 20 69 6e 20 62 79 20 70 6c 61 79 65 72 |ped in by player| 00001010 2e 20 49 66 20 41 24 3d 22 22 20 74 68 65 6e 20 |. If A$="" then | 00001020 74 68 65 79 0d 20 20 20 20 20 20 20 20 20 20 20 |they. | 00001030 20 20 70 72 65 73 73 65 64 20 3c 52 45 54 55 52 | pressed <RETUR| 00001040 4e 3e 20 73 6f 20 65 6e 64 20 70 72 6f 63 65 64 |N> so end proced| 00001050 75 72 65 20 77 69 74 68 20 46 4e 73 6f 6c 76 64 |ure with FNsolvd| 00001060 2e 20 49 66 20 6c 65 6e 67 74 68 0d 20 20 20 20 |. If length. | 00001070 20 20 20 20 20 20 20 20 20 6f 66 20 73 74 72 69 | of stri| 00001080 6e 67 20 69 73 20 6d 6f 72 65 20 74 68 61 6e 20 |ng is more than | 00001090 33 2c 20 6f 72 20 6c 65 74 74 65 72 20 69 73 6e |3, or letter isn| 000010a0 27 74 20 41 2d 5a 20 74 68 65 6e 20 70 6c 61 79 |'t A-Z then play| 000010b0 65 72 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |er. | 000010c0 6d 69 73 74 79 70 65 64 2e 20 49 66 20 74 68 65 |mistyped. If the| 000010d0 20 73 74 72 69 6e 67 20 69 73 20 4f 4b 2c 20 74 | string is OK, t| 000010e0 68 65 6e 20 63 68 65 63 6b 20 74 6f 20 73 65 65 |hen check to see| 000010f0 20 74 68 61 74 0d 20 20 20 20 20 20 20 20 20 20 | that. | 00001100 20 20 20 6c 65 74 74 65 72 20 68 61 73 6e 27 74 | letter hasn't| 00001110 20 61 6c 72 65 61 64 79 20 62 65 65 6e 20 70 6c | already been pl| 00001120 61 79 65 64 2e 0d 0d 73 6f 6c 76 64 20 20 20 20 |ayed...solvd | 00001130 20 20 20 20 43 68 65 63 6b 73 20 70 6c 61 79 65 | Checks playe| 00001140 72 27 73 20 73 6f 6c 75 74 69 6f 6e 20 61 67 61 |r's solution aga| 00001150 69 6e 73 74 20 61 63 74 75 61 6c 20 61 6e 73 77 |inst actual answ| 00001160 65 72 2e 20 43 25 20 73 65 74 20 74 6f 0d 20 20 |er. C% set to. | 00001170 20 20 20 20 20 20 20 20 20 20 20 54 52 55 45 20 | TRUE | 00001180 74 6f 20 62 65 67 69 6e 20 77 69 74 68 2c 20 74 |to begin with, t| 00001190 68 65 6e 20 69 66 20 61 6e 79 20 6c 65 74 74 65 |hen if any lette| 000011a0 72 20 69 6e 20 74 68 65 20 70 6c 61 79 65 72 27 |r in the player'| 000011b0 73 20 67 72 69 64 0d 20 20 20 20 20 20 20 20 20 |s grid. | 000011c0 20 20 20 20 64 6f 65 73 6e 27 74 20 6d 61 74 63 | doesn't matc| 000011d0 68 2c 20 66 75 6e 63 74 69 6f 6e 20 77 69 6c 6c |h, function will| 000011e0 20 65 6e 64 20 77 69 74 68 20 43 25 3d 46 41 4c | end with C%=FAL| 000011f0 53 45 2e 0d 20 20 20 20 20 20 20 20 20 20 20 20 |SE.. | 00001200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001220 20 20 20 20 20 43 68 72 69 73 20 44 65 77 68 75 | Chris Dewhu| 00001230 72 73 74 2c 20 45 55 47 20 23 35 35 0d |rst, EUG #55.| 0000123d