The Best of Creative Computing Volume 1 (published 1976)

Page 240 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails

A Universal Word Game in BASIC (BASIC program code for spiel1 German word game)

graphic of page

If a match is made on the first try a congratulatory message is displayed (line
680), counters 1 and 3 are incremented and the loop continues (line 742 is the
bottom).  
If a match is not made on the first attempt, the program branches to line 730,
which prints the equivalent in the target language of "the answer is." The
variable 'z' is again evaluated for evenness or oddness, and an appropriate
branch to either 735 or 739 gives the student the correct answer, followed by a
request to type it. Unless the student input ('t$') at this point matches,
control branches back to 730 and the loop continues until a match is made. 
The remainder of the program is taken up with evaluation by section and score,
and is for the most part straightforward. 
This program can be used for vocabulary games in any language. The data-read
feature will easily handle an array of a few hundred items, but for larger item
arrays it would probably be advisable to use a data file.

List spiel1
Spiel 1 	10:16	09/25/74	Wednesday

70 print 'welcome to spiel1, the German word game.'

80 print 'do you want instructions? (yes/no)'

85 input a$
90 if a$='no' then 360
100 print 'in this game you will have to match a word'

110 print 'with its antonym or opposite meaning.'

120 print 'for example, if you are given "hot" you'

130 print 'are expected to type "cold." in'

140 print 'this game, the words are in german.'

150 print ' the entire game has three parts, '

160 print ' going from easy words to harder words.'

165 print ' some items are more than one word'

170 print 'on each part you will have to match seven out'

180 print ' of ten in order to go on to the next part. '

190 print ' if you fail to do this in the first or second parts'

200 print ' you will automatically be put out of the game.'

210 print ' the words are chosen at random from large'

220 print ' pools of lexical items, in some cases'

230 print 'a word or phrase may have more than one antonyms, but '

240 print ' only one of them has been arbitrarily chosen'

250 print ' for the game, umlauts do not exist'

260 print ' in the system, so you are asked to type'

270 print ' the following for them:ae, oe, ue, aeu.'

271 print ' do not capitalize nouns.'

272 print 'questions and comments should be directed'

274 print ' to prof. barney Milstein, Stockton state'

276 print ' college, Pomona, nj 08240.'

280 print ' the scale for the scores is as follows :  '

290 print '		15 – 20-------student'

300 print '		21 – 22-------pberdummkopf'

310 print '		23 – 24-------dummkopf'

320 print '		25 – 26-------unterdummkopf'

330 print '		27 – 28-------klug'

340 print '		29	-------intelligent'

350 print '		30-------------LEHRER!!!'

360 print ' give me a number to get me started, please'

365 input a
380 q = rnd(a)
400 dim w$(216), f(216)
410 c1=0
420 c2=0
430 c3=0
440 rem cl ctr for corr ans;c2 for total in each sections, c3 for tot crct.

450 for l=1 to 216
460 for(l)=0
470 next l
480 rem f(l) is for flagging used words
490 for i=1 to 216
500 read w$(i)
510 next i
520 for j=1 to 10
530 if c2<10 then 590
540 if c2<20 then 570
550 z = int(144 + (70 *rnd +1)
560 go to 600
570 z = int(72 + ((70 *rnd +1)
580 go to 600
590 z = int(70 *rnd +1)
600 if f(z) = 1 then 530
610 f(z) = 1
615 print w$(z)
620 c2 = c2 + 1
625 rem test for odd or even z
630 if int(z/2)=z/2 then 670
640 input x$
645 f(z+1)=1
650 if x$<>w$(z+1) then 730
660 go to 680
670 input x$
674 f(z-1) = 1
675 if x$<>w$(z-1) then 730
680 print 'gut!!'

690 c1=c1 + 1
710 c3=c3 + 1
720 go to 742
730 print 'die antwort ist: ';
733 if int(z/2) = (z/2) then 739
735 print w$(z + 1); '—type it please.'

736 input t$
737 if t$ = w$(z + 1) the 742
738 go to 730
739 print w$(z-1); '—type it please.'

740 input  t$
741 if t$ <>  w$(z-1) then 730
742 next j
750 if z<=72 then 870
760 if z<=144 then 925
770 print 'your score for all three parts is'; c3
780 print 'your rating is'

790 if c3=30 then 1000
800 if c3=29 then 1020
805 if c3>=27 then 1040
810 if c3>=25 then 1060
820 if c3>=23 then 1080
830 if c3>=21 then 1100
860 if c3<20 then 1120
870 if c3<7 then 5000
880 print ' you have done the first part '

890 print ' with'; c1 ; 'correct answers'

900 print ' you will now go on to the second part'

910 c1=0
920 go to 520
925 if c1<7 then 5000
930 print 'congratulations!! You have done the second part'

940 print 'with ';c1' 'correctly answered'

950 print 'you will now go on to the third part.'

960 c1=0
970 go to 520
1000 print 'LEHRER!!!'

1010 go to 1140
1020 print 'intelligent'

1030 go to 1140
1040 print 'klug'

1050 go to 1170
1060 print 'unterdummkopf'

1070 go to 1170
1100 print 'oberdummkopf'

1110 go to 1170
1120 print 'student'

1130 go to 1170
1140 print ' this is not so bad'

1150 print ' come back and play again some time.  Auf Wiedersehen!!'

1160 go to 5050
1170 print ' you can do better.  come back and '

1180 print 'play again some time.  Auf Wiedersehen!!'

1190 go to 5050
2000 data 'bekannt', 'unbekannt', 'gut', 'schlecht', 'krank', 'gesund'

2010 data 'lang', 'kurz', 'gross', 'klein', 'schwach', 'stark', 'arm', 'reich'

2020 data 'frueh', 'spaet', 'klug', 'dumm',  'leicht', 'schwer', 'immer', 'nie'

2030 data 'ohne', 'mit', 'heiss', 'kalt', 'vermeidlich', 'unvermeidlich'

2040 data 'nichts',  'alles', 'dunkel', 'hell', 'links', 'rechts', 'dick',
'duenn'

2050 data 'froh', 'traurig', 'suess', 'bitter', 'alt', 'jung', 'kuehl', 'warm'

2060 data 'letzt', 'erst', 'mehr', 'weniger', 'sicher', 'unsicher'

2100 data 'das ende', 'der anfang', 'fuehren', 'folgen', 'leer',  'voll'

2110 data 'hier', 'dort', 'rueckwaerts', 'vorwaerts', 'zuerst', 'zuletzt'

2120 data 'der frieden', der krieg', 'morgen', 'gestern', 'lieben', 'hassen'

2130 data 'das licht', 'die finsternis', 'der morgen', 'der abend', 'der tag'

2135 data 'die nacht'

3000 data 'hoch', 'niedrig', 'schoen', 'haesslich', 'faul', 'fleissig'

3010 data 'fuer', 'gegen', 'ueber',  'unter', 'vor', 'hinter', 'messbar'

3020 data 'unmessbar', 'viel', 'wenig', 'weich', 'hart', 'feucht', 'trocken'

3030 data 'sichtbar', 'unsichtbar', 'falsch', 'wahr', 'guenstig', 'unguenstig'

3040 data 'tapfer', 'feig', 'locker', 'fest', 'nackt', 'gekleidet', 'oft',
'selten'

3050 data 'offen', 'geschlossen',  'oben', 'unten', 'scharf', 'dumpf'

3060 data 'geschmacksvoll', 'geschmacklos', 'genau', 'ungefaehr', 'laut',
'leise'

3070 data 'moeglich', 'unmoeglich', 'weit', 'nah'

3100 data 'beginnen', 'enden', 'tot', 'am leben'

3110 data 'loben', 'tadein', 'glauben', 'zweifeln', 'frei', 'gebunden'

3120 data 'der  freund', 'der feind', 'freundlich', 'feindlich', 'woher',
'wohin'

3130 data 'verschwinden', 'erscheinen', 'ueberall', 'nirgendwo', 'niemand'

3135 data 'jedermann'

4000 data 'einfach', 'kompliziert', 'besonders', 'allgemein', 'sorgfaeltig'

4010 data 'schlampig', 'aeusserlich', 'innerlich', 'eng', 'breit'

4020 data 'genuegend', 'unzulaenglich', 'ausserordentlich', 'gewoehnlich'

4030 data 'winzig', 'riesig', 'gerader', 'krumm', 'staending', 'unterbrochen'

4040 data 'himmlisch', 'irdisch', 'vorher', 'nachher', 'ledig', 'verheiratet',
4050 data 'wachen', 'schlafen', 'einschlafen', 'aufwachen', 'bejahen'

4060 data 'verneinen', 'aufmachen', 'zumachen', 'geben', 'nehmen'

4070 data 'flach', 'hueglig', 'mitternacht', 'mittag', 'bestehen',  'vergehen'

4080 data 'schliessen', 'oeffnen', 'sterben', 'geboren werden', 'sinnvoll'

4090 data 'sinnlos', 'vergessen', 'sich erinnern'

4100 data 'stolz', 'demutig', 'anzuenden', 'ausloeschen', 'erlauben',
'verbieten'

4110 data 'fuellen', 'leeren', 'loesen', 'binden', 'sinken', 'schwimmen'

4120 data 'wecken', 'einschlaefern', 'hinstellen', 'aufheben'

4125 data 'ablehnen', 'annehmen'

4130 data 'der vorteil', 'der nachteil', 'sich anziehen', 'sich ausziehen'

4135 data 'einpacken', 'auspacken'

5000 print 'you have gotten less than seven correct '

5005 if c2>10 then 5015
5010 print ' on the first part'

5012 go to 5020
5015 print ' on the second part'

5020 print ' go home and try again another day'

5030 print 'a u f'

5040 print 'w I e d e r s e h e n !!!' 
5050 end

Page 240 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails