-
Notifications
You must be signed in to change notification settings - Fork 11
/
A08_Flits.bc3
153 lines (152 loc) · 5.6 KB
/
A08_Flits.bc3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
1000 A=500:GOTO20:REM "FLITS"
1010 DIML$(8):AA=ASC("A"):SP=0:SV=0
1020 T$=" "
1030 GOSUB100
1040 PRINT:PRINT
1050 SR$=" F L I T S ":GOSUB150:PRINT:PRINT
1060 PRINT"Dit programma laat in een flits"
1070 PRINT"een getal, een woord of een"
1080 PRINT"auto-nummer zien."
1090 PRINT"Dat moet je precies na typen."
1100 PRINT"Maar als je dat goed doet, wordt"
1110 PRINT"de volgende flits iets korter!"
1120 PRINT"Als het niet goed gaat, dan wordt"
1130 PRINT"de flits juist weer wat langer."
1140 PRINT"Onder op het scherm staat de"
1150 PRINT"FLITS-TIJD."
1160 PRINT"Maak die zo klein mogelijk!"
1170 PRINT:PRINT:PRINT"Tik op een toets";:GOSUB210:GOSUB100
1180 PRINT:PRINT:GP=0.0001:SD=20:REM >> FLITSDUUR <<
1190 SR$=" K E U Z E ":GOSUB150:PRINT:PRINT
1200 PRINT"( S = stoppen )":PRINT:PRINT
1210 PRINT"Wil je GETALLEN,":PRINT" WOORDEN,"
1220 PRINT" AUTO-NUMMERS ?":PRINT
1230 PRINT"tik G, W of A";:GOSUB210
1240 IFIN=83 THEN950
1250 IF(IN<>65)AND(IN<>71)AND(IN<>87) THENPRINT:GOTO1230
1260 PRINT:PRINT:K1=1:IFIN=87 THENK1=2
1270 IFIN=65 THENK1=3:K2=8
1280 ONK1 GOTO1290,1300,2000
1290 PRINT"GETALLEN van HOEVEEL CIJFERS?":GOTO1310
1300 PRINT"WOORDEN van HOEVEEL LETTERS?"
1310 PRINT"Tik 1, 2, 3, 4 of 5 ";:GOSUB210
1320 IFIN=83 THEN950
1330 IF(IN<49)OR(IN>53) THENPRINT:GOTO1310
1340 K2=IN-48
2000 GOSUB600:PH=1/HG:PV=1/VG
2010 REM ---trek lijnen---
2020 CN=0:HO=.15:VE=.3:GOSUB620:HO=.38:GOSUB630
2030 HO=.42+K2*9*PH:VE=.3:GOSUB620:HO=.85:GOSUB630
2040 HO=0:VE=.2:GOSUB620:HO=1-PH:GOSUB630
2050 VE=.4:GOSUB630:HO=0:GOSUB630:VE=.2:GOSUB630
2060 HO=.3:VE=.1:SR$="! = MENU":GOSUB650
3000 REM ===HOOFDPROGRAMMA===
3010 ONK1 GOTO3030,3060,3250
3020 REM ---getallengenerator---
3030 GOSUB260:SR=10000+INT(RV*90000)
3040 GOSUB300:X$=LEFT$(SR$,K2):SR=VAL(X$):GOTO3510
3050 REM ---woordengenerator---
3060 ONK2 GOTO3080,3080,3120,3150,3200
3070 REM ---1 letter---
3080 GOSUB260:X=AA+INT(RV*26):X$=CHR$(X):IFK2=1 THEN3510
3090 REM ---2 letters---
3100 GOSUB260:X=AA+INT(RV*26):X$=X$+CHR$(X):GOTO3510
3110 REM ---3 letters---
3120 RESTORE:GOSUB260:FORN=1 TORV*50:READX$:NEXTN
3130 GOTO3510
3140 REM ---4 letters---
3150 RESTORE
3160 READX$:IFX$<>"W4" THEN3160
3170 GOSUB260:FORN=1 TORV*50:READX$:NEXTN
3180 GOTO3510
3190 REM ---5 letters---
3200 RESTORE
3210 READX$:IFX$<>"W5" THEN3210
3220 GOSUB260:FORN=1 TORV*50:READX$:NEXTN
3230 GOTO3510
3240 REM ---autonummergenerator---
3250 FORN=1 TO4:GOSUB260:L$(N)=CHR$(AA+RV*26):NEXTN
3260 FORN=5 TO8
3270 GOSUB260:SR=INT(RV*10):GOSUB300:L$(N)=SR$:NEXTN
3280 X$=L$(1)+L$(2)+"-"+L$(5)+L$(6)+"-"+L$(3)+L$(4)
3290 REM 1-4=letters, 5-8=cijfers, hier dus LL-CC-LL
3500 REM --- wis vorige flitsduur ---
3510 CN=1:HO=0:VE=.8:SR$=T$:GOSUB650:CN=0
3520 REM ---print de flitsduur---
3530 SR=SD/10:CT=3:CN=1:GOSUB310
3540 CN=0:SR$=SR$+" sek.":GOSUB650:T$=SR$
3550 REM ---werk grafiek bij---
3560 CN=0:HO=GR:VE=1-PV:GOSUB620:VE=1-SD*PV:GOSUB630
3570 GP=GP+PH:IFGP>=1-PH THEN950
3580 REM ---doe de flits---
3590 Z$="":FORN=1 TOLEN(X$):Q$=MID$(X$,N,1)
3600 IFQ$="0" THENQ$="O"
3610 Z$=Z$+Q$:NEXTN:REM ---0 wordt O---
3620 HO=.4:VE=.29:SR$=Z$:GOSUB650
3630 GOSUB400:REM >> FLITSDUUR <<
3640 CN=1:GOSUB650:CN=0
3650 HO=.37:VE=.6:SR$="?":GOSUB650
3660 REM ---input antwoord---
3670 Y$="":LY=0:HO=.4:VE=.6
3680 GOSUB210:IFIN=13 THEN3790
3690 IFIN$="!" THEN GOSUB100:GOTO1180
3700 IF(IN<33)OR(IN>127) THEN3680
3710 IF(IN=127)AND(LY=0) THEN3680
3720 IFIN<>127 THEN3770
3730 CN=1:SR$=Y$:GOSUB650:CN=0
3740 IFLEN(Y$)=1 THENY$="":GOTO3760
3750 Y$=LEFT$(Y$,LEN(Y$)-1)
3760 LY=LY-1:SR$=Y$:GOSUB650:GOTO3680
3770 Y$=Y$+IN$:LY=LY+1:SR$=Y$:GOSUB650:GOTO3680
3780 REM ---beoordeling---
3790 G=0:SD=SD+1:IFX$=Y$ THENG=1:SD=SD-2:IFSD=0 THENSD=1
3800 IFSD>40 THENSD=40
3810 HO=.4:VE=.6:SR$=Y$:GOSUB650
3820 IFG=1 THENHO=.4:VE=.7:SR$="GOED !":GOSUB650:GOTO3840
3830 HO=0:VE=.7:SR$="JAMMER, het was "+X$:GOSUB650
3840 HO=.4:VE=.8:SR$="tik SPATIEBALK":GOSUB650
3850 IFCN=1 THEN3890
3860 GOSUB210:IF(IN<>32)AND(IN$<>"!") THEN3860
3870 IFIN$="!" THEN GOSUB100:GOTO1180
3880 CN=1:GOTO3810
3890 CN=0:ONK1 GOTO3030,3060,3250
3900 REM
25000 DATA"DAK","HOK","MAN","SAP","VIS"
25010 DATA"LAK","MIS","UIT","BOS","TAK"
25020 DATA"KAT","UIL","BOK","TOR","RAT"
25030 DATA"VAT","VET","PAN","WAS","ZOT"
25040 DATA"TIK","REM","POP","KAR","BUS"
25050 DATA"LEK","HIJ","WIJ","WEI","MEI"
25060 DATA"KOU","KOM","DUS","KAM","LAM"
25070 DATA"DAS","SOK","ELF","ZES","MES"
25080 DATA"KEI","EIK","IEP","GEK","DUN"
25090 DATA"BOL","MUG","SIP","KOE","OEF"
25100 DATA"W4"
25110 DATA"HALT","HOUT","JONG","MUIS","PLOF"
25120 DATA"HOOP","KIST","PLAK","BALK","KURK"
25130 DATA"HARK","BANG","SLAK","GOED","MOOI"
25140 DATA"HOOI","OLIE","OPEN","LAAT","VLUG"
25150 DATA"KOEK","WESP","VIER","VUUR","HAND"
25160 DATA"BOEK","TIJD","ZWAK","MIER","DOEK"
25170 DATA"BIJL","ZEIL","STER","REUS","NEUS"
25180 DATA"KNIE","FLES","TAAL","TAAK","KAAL"
25190 DATA"RAND","WENS","SNEL","TOUW","HIER"
25200 DATA"ZALM","BEER","KRUK","VOUW","DEUR"
25210 DATA"W5"
25220 DATA"NEGEN","LEVER","BEEST","KATER","STANG"
25230 DATA"VLIEG","KEVER","METER","SLANG","GROND"
25240 DATA"BOTER","ANKER","LEPEL","BETER","PLONS"
25250 DATA"RATEL","LATER","ZEKER","KOPER","REGEL"
25260 DATA"MOTOR","KAPOT","STUUR","WAGON","KRUIK"
25270 DATA"KRAAN","WATER","GROEN","VADER","BROER"
25280 DATA"TANTE","GROEP","GELUK","JARIG","TAART"
25290 DATA"LENTE","BLOEM","TAFEL","STRIK","BOTER"
25300 DATA"BOVEN","KRIJT","BLAUW","HOPEN","KAART"
25310 DATA"LUCHT","KRAAI","LOKET","TYPEN","KLAAR"
25320 REM
32000 REM Gemaakt op BBC-computer
32010 REM januari 1989
32020 REM Ch.W.Brederode
32030 REM Von Bonninghausenlaan 33
32040 REM 2161 ES LISSE
32050 REM