12REM Line 10 is neat! To save the pr
ogram, type in SAVE FNS and it saves it
to disc with the name given in quotes. T
hanks to Jon (Ed).
14REM A small program to choose 7 ran
dom letters for 4 players at scrabble.
21REM I find that putting in the mode
like this is a neat way of getting the p
rogram to clear a lot of things in the c
omputer. Don't know why!
23REM I guess MODE 7 is kind of basic
26REM The scrabble bag has 100 letter
s in it. There are 26 letters in the alp
habet and a blank (#) makes 27. Each let
ter in the alphabet has its own score so
27 scores as well.
28REM See lines 600-610 for letters a
30REM Line 40 sets aside space for th
e letters,numbers of letters and scores
32REM Does DIM mean the computer is s
o dim that it has to be TOLD to set the
34REM Or is it that they have been ki
nd and given us dim humans a basic code
word to do it?!!
44REM Now we can make 3 numbered list
s in this space.
46REM To do this we can use a variabl
e 1 to 100 and 1 to 27.FOR X=- TO - seem
s the best way
54REM Lines 60 to 100 use a procedure
4 times to choose 7 letters for each pl
110PRINTTAB(2,18)"Press any key to go
again. Escape to exit. LIST CTRLN RET
URN to list program and read it."
330REMthe procedure above uses a loop
of 7 to get 7 letters for the player lin
es 210 - 260
332REM puts a random number between 1
and 100 into R line 220
334 REMturns it into a number from 1 t
o 27 at line 230 see FNn()
336REMchecks to see if this letter is
in the bag line 234
338REM if not sends you back to random
R again to get another one
340REMprints the letter on screen
342REMtakes one away from number(N) in
the list holding the numbers of each le
tter. E.G. There are 9 A,s. number(1)=9.
9-1=8. Now number(1) will be 8. and so o
620REM if you look at the DATA you can
see the 100 letters in line 600
622REM line 610 has the number of (A's
) and its score value, then the number o
f B's and its score value etc etc to Z a
nd the # which come last.
750REM N=ASCletter$(R) this means that
it converts the letter taken out of the
bag into its ASC value A=65, B=66 etc.
and puts this number into N.
752REMthe FNn then first takes away 64
so that we have the numbers 1 to 26 for
the letters of the alphabet
754REMthen second, looks to see if th
e blank (#) has been chosen (ASC 35) if
so changes it into 27 to fit in the numb