crap:
PRINT "Error, Line number" beginning:
DIM SHARED translationMatrix$
(1 TO 26, 1 TO 2):
FOR cl
= 1 TO 26: translationMatrix$
(cl
, 1) = "": translationMatrix$
(cl
, 2) = "":
NEXT cl
DIM SHARED highlightedLetter: highlightedLetter
= 0 DIM SHARED attemptedLetters$
(1 TO 26, 1 TO 2):
FOR cl
= 1 TO 26: attemptedLetters$
(cl
, 1) = CHR$(cl
+ 64): attemptedLetters$
(cl
, 2) = "-":
NEXT cl
FOR cl
= 1 TO numberOfLines
workingLines$(cl) = ""
initiallyCodedLines$(cl) = ""
newLines$(cl) = ""
answerLines$(cl) = ""
leftPositions(cl) = 0
'first, pick a phrase
randomPhrase
= INT(RND * FileStatus
) + 1 FOR x
= 1 TO randomPhrase
'second, create a code
usedAlphabet$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
translationMatrix$
(allLetters
, 1) = CHR$(allLetters
+ 64) newRndLet:
randomLetter
= INT(RND * LEN(usedAlphabet$
)) + 1 translationMatrix$
(allLetters
, 2) = MID$(usedAlphabet$
, randomLetter
, 1) IF translationMatrix$
(allLetters
, 1) = translationMatrix$
(allLetters
, 2) THEN GOTO newRndLet
usedAlphabet$
= MID$(usedAlphabet$
, 1, randomLetter
- 1) + MID$(usedAlphabet$
, randomLetter
+ 1, LEN(usedAlphabet$
))
'third: put the phrase in code
answerLetter$
= MID$(answerPhrase$
, letter
, 1) upAnsLet$
= UCASE$(answerLetter$
) answerLetterNumber
= ASC(upAnsLet$
) - 64 upCodeLet$
= translationMatrix$
(ASC(upAnsLet$
) - 64, 2) codedLetter$ = upCodeLet$
codedLetter$
= LCASE$(upCodeLet$
) codedLetter$ = answerLetter$
codedPhrase$ = codedPhrase$ + codedLetter$
'next on the list is to center the phrases
shrinkCode$ = codedPhrase$
shrinkAns$ = answerPhrase$
numLine = 0
numLine = numLine + 1
checkHere = 60
checkHere = checkHere - 1
findSpace$
= MID$(codedPhrase$
, checkHere
, 1) workingLines$
(numLine
) = MID$(shrinkCode$
, 1, checkHere
) initiallyCodedLines$
(numLine
) = MID$(shrinkCode$
, 1, checkHere
) leftPositions
(numLine
) = Center
(MID$(shrinkCode$
, 1, checkHere
)) answerLines$
(numLine
) = MID$(shrinkAns$
, 1, checkHere
) shrinkCode$
= MID$(shrinkCode$
, checkHere
+ 1, LEN(shrinkCode$
)) shrinkAns$
= MID$(shrinkAns$
, checkHere
+ 1, LEN(shrinkAns$
)) workingLines$(1) = codedPhrase$
initiallyCodedLines$(1) = codedPhrase$
answerLines$(1) = answerPhrase$
leftPositions(1) = Center(codedPhrase$)
cs = 1
' DO WHILE leftPositions(cs) <> 0
' LOCATE , leftPositions(cs): PRINT answerLines$(cs)
' cs = cs + 1
' LOOP
' gg = 1
' DO WHILE leftPositions(gg) <> 0
' LOCATE , leftPositions(gg): PRINT workingLines$(gg)
' gg = gg + 1
' LOOP
' a$ = P$
'now to display and build the interface
highlightedLetter = 1
' d$ = P$
plsWt = FALSE
' FOR cv = 1 TO numberOfLines: newLines$(cv) = "": NEXT cv
highlightedLetter = highlightedLetter - 1
highlightedLetter = 26
plsWt = TRUE
IF highlightedLetter
< 26 THEN highlightedLetter = highlightedLetter + 1
highlightedLetter = 1
plsWt = TRUE
attemptedLetters$
(cl
, 1) = CHR$(cl
+ 64) attemptedLetters$(cl, 2) = "-"
FOR x
= 1 TO numberOfLines
workingLines$(x) = initiallyCodedLines$(x)
CASE "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" plsWt = TRUE
attemptedLetters$(highlightedLetter, 2) = getCmd$
numLines = 1
DO WHILE workingLines$
(numLines
) <> "" FOR let1
= 1 TO LEN(workingLines$
(numLines
)) currentLetter$
= MID$(workingLines$
(numLines
), let1
, 1) ' LOCATE 1, 1: PRINT "currentLetter$: " + currentLetter$: g$ = P$
replacementLetter$ = getCmd$
letCase
= ASC(MID$(workingLines$
(numLines
), let1
, 1)) IF letCase
>= 97 AND letCase
<= 122 THEN replacementLetter$
= LCASE$(replacementLetter$
) newLines$(numLines) = newLines$(numLines) + replacementLetter$
newLines$(numLines) = newLines$(numLines) + currentLetter$
' PRINT "**************************************************************************************************"
' PRINT "newLines$(numLines) = " + newLines$(numLines): k$ = P$
numLines = numLines + 1
plsWt = FALSE
f = 1
workingLines$(f) = newLines$(f)
f = f + 1
rtn = TRUE
FOR checkTheLine
= 1 TO numberOfLines
IF workingLines$
(checkTheLine
) <> answerLines$
(checkTheLine
) THEN rtn
= FALSE
SolvedIt = rtn
'print out the quote
numLines = 1
DO WHILE leftPositions
(numLines
) <> 0 'LOCATE 48, 1: PRINT "leftPositions(numLines) = " + S$(leftPositions(numLines)) + " ": c$ = P$
LOCATE 11 + numLines
, leftPositions
(numLines
) ' PRINT "numLines: " + S$(numLines) + " workingLine$(numlines), LEN = " + workingLines$(numLines) + ", " + S$(LEN(workinglines(numLines)))
' PRINT "initiallyCodedLines$(" + S$(numLines) + "): = " + initiallyCodedLines$(numLines)
' PRINT "answerLines$(numLines)" + answerLines$(numLines)
' f$ = P$
FOR o
= 1 TO LEN(workingLines$
(numLines
)) wlc$
= MID$(workingLines$
(numLines
), o
, 1) icl$
= MID$(initiallyCodedLines$
(numLines
), o
, 1) al$
= MID$(answerLines$
(numLines
), o
, 1) IF ASC(UCASE$(wlc$
)) - 64 = highlightedLetter
THEN 'if the letter is highlighted print 11 on 0 ELSEIF wlc$
<> icl$
THEN 'the letter has been changed or not changed back to its original code numLines = numLines + 1
'print out the selectable letters
spaces = 2
spaces = spaces + 3
PRINT #1, "Tomorrow, and tomorrow, and tomorrow, Creeps in this petty pace from day to day, To the last syllable of recorded time; And all our yesterdays have lighted fools The way to dusty death. Out, out, brief candle! Life's but a walking shadow, a poor player, That struts and frets his hour upon the stage, And then is heard no more. It is a tale Told by an idiot, full of sound and fury, Signifying nothing." PRINT #1, "To be, or not to be: that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep; To sleep: perchance to dream: ay, there's the rub; For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause" PRINT #1, "If someone is able to show me that what I think or do is not right, I will happily change. For I seek the truth, by which no oe ever was truly harmed. Harmed is the person who continues in his self-deception and ignorance." PRINT #1, "Funny lines: Before you marry a person, you should first make them use a computer with slow internet to see who they really are. -- Someone asked me, if I were stranded on a desert island what book would I bring... " + CHR$(34) + "How to Build a Boat." + CHR$(34) PRINT #1, "Funny lines: I finally realized that people are prisoners of their own phones... that's why it's called a " + CHR$(34) + "cell" + CHR$(34) + " phone. -- Be decisive. Right or wrong, make a decision. The road is paved with flat squirrels who couldn't make a decision." PRINT #1, "Funny lines: If at first you don't succeed, then skydiving definitely isn't for you. -- My cell phone is acting up. I keep pressing the Home button but every time I look around, I'm still at work." PRINT #1, "Pangrams: Pack my box with five dozen liquor jugs. -- The quick brown fox jumps over the lazy dog. -- My girl wove six dozen plaid jackets before she quit." numberOfPhrases = 7
numberOfPhrases = 0
numberOfPhrases = numberOfPhrases + 1
numberOfPhrases = numberOfPhrases - 1
FileStatus = numberOfPhrases
Center
= INT((80 - LEN(text$
)) / 2)
P$ = pause$