Compucolor.org – Virtual Media

Listing of file='CREATE.BAS;01' on disk='vmedia/bounce_ball-sector.ccvf'

10 CLEAR 5000
15 SP$= "                                ":REM  32 SPACES
19 REM   INSTRUCTIONS
20 GOTO 2000
99 REM
100 FILE "N",WF$,2* NW,16,16
110 FILE "N",CF$,2* NW,32,8
120 FILE "R",1,WF$,9
130 FILE "R",2,CF$,9
200 PRINT :PRINT :F= 0
210 PLOT 15,6,5:PRINT "  WORDS ACROSS":PLOT 6,3
220 GOSUB 500
230 PRINT :PRINT :F= NW
240 PLOT 6,5:PRINT "   WORDS DOWN":PLOT 6,3
250 GOSUB 500
300 PRINT :PRINT :F= 0
305 GOSUB 2500
310 PLOT 6,5:PRINT "   CLUES ACROSS":PLOT 6,3
320 GOSUB 700
330 PRINT :PRINT :F= NW
340 PLOT 6,5:PRINT "   CLUES DOWN":PLOT 6,3
350 GOSUB 700
360 PRINT :PRINT
370 PLOT 6,1:PRINT "     ***  END OF ENTRIES  ***"
400 FILE "C",1,2
405 IF Q$= "Y"THEN END
410 PRINT :PRINT :PLOT 6,2
415 PRINT "NOW BE SURE TO UPDATE THE CROSSWORDS PROGRAM BY ENTERING"
420 PRINT "THE NAME OF YOUR PUZZLE INTO THE PUZZLE MENU STARTING AT LINE"
425 PRINT "5000 IN THE CROSSWORDS PROGRAM.  ALSO ENTER THE VALUE FOR"
430 PRINT "NW (NUMBER OF WORDS--FOR YOUR PUZZLE IT IS"NW") STARTING AT"
435 PRINT "LINE 5115."
445 END
498 REM
499 REM   WORDS
500 FOR J= 1TO NW:PRINT :PLOT 6,3
505 PRINT "WORD #"J;:INPUT ": ";W$
510 IF LEN (W$)> 16THEN GOSUB 1000:GOTO 505
515 IF LEFT$ (W$,1)< > "?"THEN 600
520 PLOT 6,1:PRINT :PRINT "(ENTER -9 TO EXIT THE CORRECTION MODE)"
525 INPUT "CHANGE:  STARTING AT WHICH NUMBER? ";N
530 IF N< 1THEN 600
535 J= N:GET 1,F+ N;W$[16]
540 PRINT :PRINT "WORD #"N": "W$
545 PRINT "NEW ";:GOTO 505
600 IF W$= "!"THEN J= NW:GOTO 625
602 FOR K= 1TO LEN (W$)
605 IF MID$ (W$,K,1)= " "THEN GOSUB 1020:GOTO 505
610 NEXT
615 W$= LEFT$ (W$+ SP$,16)
620 PUT 1,F+ J;W$[16]
625 NEXT :RETURN
698 REM
699 REM   CLUES
700 FOR J= 1TO NW:PRINT :PLOT 6,3
705 PRINT "CLUE #"J;:INPUT ": ";W$
710 IF LEN (W$)> 32THEN GOSUB 1000:GOTO 705
715 IF LEFT$ (W$,1)< > "?"THEN 800
720 PLOT 6,1:PRINT
725 INPUT "CHANGE:  STARTING AT WHICH NUMBER? ";N
730 IF N< 1THEN 800
735 J= N:GET 2,F+ N;W$[32]
740 PRINT :PRINT "CLUE #"N": "W$
745 PLOT 6,1:PRINT "NEW ";:GOTO 705
800 IF W$= "!"THEN J= NW:GOTO 810
805 PUT 2,F+ J;W$[32]
810 NEXT :RETURN
1000 PLOT 6,1:PRINT "THAT'S TOO LONG!"
1005 PLOT 6,3:PRINT :RETURN
1020 PLOT 6,1:PRINT "NO SPACES ALLOWED!"
1025 PLOT 6,3:PRINT :RETURN
2000 PLOT 14,6,6,12,3,20,3:PRINT "CREATE CROSSWORD PUZZLE"
2005 PLOT 15,18
2010 PRINT "THE PUZZLE FIELD IS LIMITED TO THE CURSOR POSITIONS X: 0 - 63,"
2015 PRINT "Y: 0 - 20.  EACH LETTER (IN BOTH HORZ. AND VERTICAL WORDS) IS"
2020 PRINT "ACTUALLY PLOTTED WITH AN INITIAL BLANK FOLLOWED BY THE LETTER,"
2025 PRINT "SO THE EFFECTIVE PUZZLE FIELD IS 32 LETTERS WIDE AND 10 HIGH."
2030 PRINT
2035 PRINT "THE USER IS RESPONSIBLE FOR WORKING OUT BEFORE HAND THE PROPER"
2040 PRINT "ARRANGEMENTS OF ALL WORDS AND THE X-Y CO-ORDINATES OF THE"
2045 PRINT "BLANK SPACE IMMEDIATELY TO THE LEFT AND ABOVE THE INITIAL"
2050 PRINT "LETTER OF EACH WORD.  AS AN EXAMPLE, SUPPOSE THE PUZZLE BEGINS"
2055 PRINT "IN THE UPPER LEFT CORNER WITH 1 ACROSS: 'BOX' AND 1 DOWN: 'BE'."
2060 PLOT 6,1,3,1,1:PRINT "B O X":PRINT :PRINT " E"
2065 PLOT 6,2,3,0,15
2070 PRINT "(SEE ABOVE.)  ALTHOUGH THE FIRST LETTER OF EACH OF THESE WORDS"
2075 PRINT "BEGINS AT X=1, Y=1, THE CROSSWORDS PROGRAM WANTS THE CO-ORDI-"
2080 PRINT "NATES FOR THE INITIAL BLANK SPACE -- X=0, Y=0."
2090 PLOT 6,1:PRINT TAB( 25)"RESTRICTIONS"
2095 PRINT
2100 PRINT " 1. THE WORDS (I.E. THE ANSWERS) MUST NOT EXCEED 14 LETTERS AND"
2105 PRINT "    MUST NOT CONTAIN BLANKS. (THE CROSSWORDS PROGRAM WILL AUTO-"
2110 PRINT "    MATICALLY SPACE ALL LETTERS ONE SPACE APART.)"
2115 PRINT
2120 PRINT " 2. THE CLUES MUST NOT EXCEED 32 CHARACTERS, BUT BLANKS ARE"
2125 PRINT "    PERMITTED."
2130 PRINT
2135 PRINT " 3. THE ARRANGEMENT OF THE WORDS MUST BE SUCH THAT NO WORD OF"
2140 PRINT "    THE PUZZLE COULD BE COMPLETELY SPELLED OUT BY ENTERING"
2145 PRINT "    SURROUNDING WORDS -- THIS HAPPENS FREQUENTLY WHEN A NUMBER"
2150 PRINT "    OF WORDS INTERSECT NEAR A COMMON POINT."
2155 INPUT "           PRESS RETURN FOR AN EXAMPLE OF THIS ";A$
2160 PLOT 12:PRINT :PRINT :PRINT
2165 PRINT TAB( 25)"  L     P"
2170 PRINT
2175 PRINT TAB( 25)"B O M B E R"
2180 PRINT
2185 PRINT TAB( 25)"  S O R E"
2190 PRINT
2195 PRINT TAB( 25)"  S O A P"
2200 PRINT
2205 PRINT TAB( 25)"    N"
2210 PRINT
2215 PRINT "IN THIS EXAMPLE, THE WORDS 'SORE', 'SOAP' AND 'BRA' ARE NOT"
2220 PRINT "LEGITIMATE BECAUSE EACH OF THEM COULD BE COMPLETELY WRITTEN"
2225 PRINT "IN BY WRITING IN SURROUNDING WORDS."
2230 PRINT
2235 PRINT "ANOTHER WAY OF LOOKING AT IT IS THIS: ALL WORDS MUST HAVE AT"
2240 PRINT "LEAST ONE LETTER WHICH IS NOT A PART OF ANY OTHER WORD."
2245 PRINT
2250 PRINT "NOW PRESS RETURN FOR INSTRUCTIONS ON ENTERING WORDS AND CLUES"
2255 INPUT "IN THIS PROGRAM. ";A$
2260 PLOT 12
2261 INPUT "DO YOU WISH TO UPDATE AN ALREADY EXISTING FILE? ";Q$
2262 Q$= LEFT$ (Q$,1):IF Q$= "Y"THEN 2300
2263 IF Q$< > "N"THEN 2261
2265 PRINT
2270 PRINT "I AM NOW ASSUMING THAT YOU HAVE CONSTRUCTED YOUR PUZZLE ON"
2275 PRINT "PAPER AND WISH TO ENTER THE WORDS AND CLUES INTO A RANDOM"
2280 PRINT "FILE TO BE ACCESSED BY THE CROSSWORDS PROGRAM."
2285 PRINT
2290 PRINT "THE WORDS (BOTH DOWN AND ACROSS) ARE STORED IN ONE RANDOM FILE"
2295 PRINT "AND THE CLUES (BOTH DOWN AND ACROSS) ARE STORED IN ANOTHER."
2300 PRINT
2305 PRINT "PLEASE SPECIFY THE FILE NUMBER FOR THESE FILES.  FOR EXAMPLE,"
2310 PRINT "'3' FOR 'WORDS3' AND 'CLUES3', ETC."
2315 GOSUB 3000
2320 WF$= "WORDS"+ N$
2325 CF$= "CLUES"+ N$
2330 PRINT :PRINT
2355 PRINT "THANK YOU."
2360 PRINT :PRINT
2365 PRINT "NOW, WHAT IS THE LARGEST NUMBER GIVEN TO A WORD IN YOUR"
2370 INPUT "PUZZLE (WHETHER DOWN OR ACROSS DOESN'T MATTER)? ";NW
2375 PRINT :PRINT
2380 PRINT "NOW YOU WILL ENTER EACH OF THE WORDS:  FIRST THE WORDS"
2385 PRINT "ACROSS, THEN THE WORDS DOWN.  REMEMBER, THERE ARE TO BE NO"
2390 PRINT "SPACES IN THESE WORDS."
2395 PRINT
2400 PRINT "PLEASE ENTER FIRST TWO DIGITS FOR THE X CO-ORDINATE OF THE"
2405 PRINT "WORD FOLLOWED IMMEDIATELY BY TWO DIGITS FOR THE Y CO-ORDINATE"
2410 PRINT "OF THE WORD.  (DO NOT OMIT LEADING ZERO'S!).  THEN ENTER"
2415 PRINT "THE WORD ITSELF.  FOR EXAMPLE, IF THERE WERE A WORD 'BEDAZZLE'"
2420 PRINT "AT X=12, Y=4, YOU WOULD ENTER '1204BEDAZZLE'.
2422 PRINT "IF THERE IS NO WORD FOR A GIVEN NUMBER, JUST HIT RETURN."
2425 PRINT
2430 PRINT "IF YOU MAKE A MISTAKE AND WISH TO CHANGE A PREVIOUS ENTRY,"
2435 PRINT "TYPE IN A QUESTION MARK."
2440 IF Q$= "N"THEN 100
2445 PRINT "TO SKIP A WHOLE SECTION OF INPUTS (E.G. TO SKIP 'WORDS ACROSS'"
2450 PRINT "AND GO ON TO 'WORDS DOWN'), ENTER '!'."
2500 PLOT 6,2:PRINT
2505 PRINT "NOW YOU WILL ENTER THE CLUES:  FIRST THE CLUES ACROSS, THEN"
2510 PRINT "THE CLUES DOWN."
2515 PRINT
2520 PRINT "THE CLUES NEED NO X-Y CO-ORDINATES, AND THEY MAY CONTAIN"
2525 PRINT "SPACES.  ENTER THEM JUST AS YOU WISH THEM TO BE PRINTED OUT."
2530 PRINT "(MAXIMUM LENGTH IS 32 CHARACTERS.)
2532 PRINT "IF THERE IS NO CLUE FOR A GIVEN NUMBER, JUST HIT RETURN."
2535 PRINT
2540 PRINT "IF YOU MAKE A MISTAKE AND WISH TO CHANGE A PREVIOUS ENTRY,"
2545 PRINT "TYPE IN A QUESTION MARK."
2550 IF Q$= "N"THEN RETURN
2555 PRINT "TO SKIP A WHOLE SECTION (E.G. TO SKIP OVER 'CLUES ACROSS"
2560 PRINT "AND GO ON TO 'CLUES DOWN'), ENTER '!'."
2565 RETURN
2999 REM
3000 IF Q$= "N"THEN PRINT "IT SHOULD BE DIFFERENT THAN ANY NOW ON DISK."
3005 PRINT
3010 INPUT "WOULD YOU LIKE TO SEE THE DISK DIRECTORY? ";A$
3015 IF LEFT$ (A$,1)= "Y"THEN PLOT 27,4:PRINT "DIR":PLOT 27,27
3020 PRINT
3025 INPUT "FILE NUMBER? ";N$
3030 RETURN