home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
UpTime Volume 2 #5
/
utv2n5s1.d64
/
stroop
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-28
|
8KB
|
237 lines
0 rem stroop
50 poke 45,peek(174):poke 46,peek(175):clr
100 dim d(9,20):dimcr(46):dimcr$(46):zq=1:dimcw$(46):dim n$(46)
110 poke53269,0:poke53281,0:poke53280,0:print"[147]";:sys 949
120 print"[156]stroop"
130 print" "
150 gosub 950
160 gosub 830
170 aa=1
180 poke53265,peek(53265)and239
190 print"[147]":gosub 530
200 gosub 320
210 print"";:for a=1to9
220 ifaa=1thenb=int((rnd(1)*26)+65):a$(a)=chr$(b):gosub420:print"[145][145][145]";:goto250
230 a$(a)=chr$(a(a)+48)
240 gosub 420:print"[145][145][145]";
250 if a=3 or a=6 then print"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";
260 next
270 poke53265,peek(53265)or16
280 gosub700:gosub950
290 ifaa=1thengosub1520:gosub1320:gosub1000:aa=aa+1:ifaa=2thengosub525:goto 180
300 gosub 1590:gosub 1660
310 goto 1080
320 forx=1to9
330 a(x)=int(rnd(1)*9)+1
340 for y=1tox-1:ifx=1 then 360
350 ifa(y)=a(x)then 330
360 next:next
370 forx=1to9
380 b(x)=int(rnd(1)*6)+1
390 z=0:for y=1 to x-1:ifx=1then410
400 ifb(y)=b(x)thenz=z+1:ifz=2then380
410 next:next:return
420 for x=1tob(a)
430 c(x)=int(rnd(1)*20)+1
440 fory=1tox-1:ifx=1then 460
450 if c(y)=c(x) then 430
460 d(a,c(x))=c(x):next:next
470 forx=1to20
480 ifx=6orx=11orx=16then print"[157][157][157][157][157]";
490 if d(a,x)=0 then print"[150] ";
500 if d(a,x)<>0 then print"[150]";a$(a);
510 next
520 return
525 forx=1to9:fory=1to20:d(x,y)=0:next:next:return
530 print"[154] [176][192][192][192][192][192][178][192][192][192][192][192][178][192][192][192][192][192][174]
540 [153]" (NULL) (NULL) (NULL) (NULL)
550 print" [221] [221] [221] [221]
560 [153]" (NULL)closecloseclosecloseclose(NULL)closecloseclosecloseclose(NULL) close(NULL)
570 print" [221] [221][160][160][160][160][160][221][160][160][160][160][160][221]
580 [153]" -tantantantantan(NULL)tantantantantan(NULL)tantantantantan<
590 print" [221] [221] [221] [221]
600 [153]" (NULL) (NULL) (NULL) (NULL)
610 print" [221][160][160][160][160][160][221][160][160][160][160][160][221] [160][221]
620 [153]" (NULL) (NULL)closecloseclosecloseclose(NULL)closecloseclosecloseclose(NULL)
630 print" [171][192][192][192][192][192][219][192][192][192][192][192][219][192][192][192][192][192][179]
640 [153]" (NULL) (NULL) (NULL) (NULL)
650 print" [221] [221] [221] [221]
660 [153]" (NULL)closecloseclosecloseclose(NULL)closecloseclosecloseclose(NULL) close(NULL)
670 print" [221] [221][160][160][160][160][160][221][160][160][160][160][160][221]
680 [153]" /tantantantantan>tantantantantan>tantantantantanexp
690 return
700 ti$="000000":x=0
710 print"";
720 j=peek(56320)
730 if j=111 then ta=ti:bb$=ti$:goto 760
740 x=x+1:ifx/10=int(x/10)then print"[156] [146]";:goto 720
750 goto 720
760 print:print
770 tb=ta/60
780 tc=int(tb*1000)
790 t(zq)=tc/1000
800 print"";
810 print" it took you a total of";t(zq);"seconds"
820 zq=zq+1:return
830 print"[147]after you read this page and press the":print
840 print"joystick button, the screen will clear.":print
850 print"after the data table is organized,":print
860 print"a 3x3 grid will appear on the screen.":print
870 print"in this grid will be various letters.":print
880 print"your task will be; starting with the":print
890 print"upper left square and proceeding left":print
900 print"to right, to quickly recite out loud":print
910 print"how many letters are in each square.":print
920 print"after saying the number of letters in":print
930 print"the last square, press the button.":print
940 gosub 950:return
950 print"[158] press the joystick button to continue"
960 x=0
970 j=peek(56320)
980 if j=111 andx>10then return
990 x=x+1:goto 970
1000 print"[147]the next task will be almost":print
1010 print"identical to the first one except that":print
1020 print"instead of letters, there will be":print
1030 print"numbers in the grid. remember, it is":print
1040 print"your task to quickly recite out loud":print
1050 print"the number of digits in each square,":print
1060 print"not the name of the digit."
1070 gosub950:return
1080 print"[147]";
1090 print"the time of your 1st test was";t(1):print
1100 print"the time of your 3rd test was";t(3):print:print
1110 print"the time of your 2nd test was";t(2):print
1120 print"the time of your 4th test was";t(4)
1130 print:print"[156]the stroop effect was first reported"
1140 print"by j. r. stroop in 1935. these types"
1150 print"of tests are used today by cognitive"
1160 print"psychologists to demonstrate the nature"
1170 print"of automatic processing. even though"
1180 print"you might try to ignore the meaning of"
1190 print"of a digit or a word, your brain"
1200 print"automatically registers this meaning."
1210 print"this is why you probably did better at"
1220 print"the first and third tasks: there were"
1230 print"no conflicting stimuli for your brain"
1240 print"to automatically process (as there were"
1250 print"in the second and fourth tasks)."
1260 print:print"[158] would you like to play again?"
1270 geta$:if a$=""then 1270
1280 if a$="n" then 1820
1290 if a$="y"then clr:run
1300 goto 1270
1310 end
1320 poke53265,peek(53265)and239:print"[147]":forx=1to50
1325 print"[147]":forx=1to46
1330 cr(x)=int(rnd(1)*6)+1
1340 ifcr(x)=1thencr$(x)=""
1350 ifcr(x)=2thencr$(x)="[158]"
1360 ifcr(x)=3thencr$(x)="[156]"
1370 ifcr(x)=4thencr$(x)=""
1380 ifcr(x)=5thencr$(x)="[151]"
1390 ifcr(x)=6thencr$(x)=""
1400 ifcr(x-1)=cr(x)then1330
1410 next
1420 n$(1)="i":n$(2)="heartily":n$(3)="accept":n$(4)="the":n$(5)="motto,-"
1421 n$(6)="that":n$(7)="government":n$(8)="is":n$(9)="best":n$(10)="which"
1422 n$(11)="governs":n$(12)="least;":n$(13)="and":n$(14)="i":n$(15)="should"
1430 n$(16)="like":n$(17)="to":n$(18)="see":n$(19)="it":n$(20)="acted"
1431 n$(21)="up":n$(22)="to":n$(23)="more":n$(24)="rapidly":n$(25)="and"
1440 n$(26)="systematically.":n$(27)=" carried":n$(28)="out,":n$(29)="it"
1441 n$(30)="finally":n$(31)="amounts":n$(32)="to"
1442 n$(33)="this,":n$(34)="which"
1450 n$(35)="i":n$(36)="also":n$(37)="believe-":n$(38)="that"
1451 n$(39)="government":n$(40)="is":n$(41)="best":n$(42)="which"
1452 n$(43)="governs":n$(44)="not":n$(45)="at":n$(46)="all."
1460 for x=1to46
1470 if pos(1)>=30 then print:print
1480 printcr$(x);:printn$(x);" ";
1490 next
1500 poke53265,peek(53265)or16
1510 gosub 700:gosub 950:return
1520 print"[147]in this task, after you have read the":print
1530 print"instructions and pressed the button, ":print
1540 print"the screen will clear. when the message"
1550 print"appears, you must quickly say out loud":print
1560 print"the color that each word is printed in.":print
1570 print"when you have recited the color of all":print
1580 print"of the words, press the joystick button.":gosub 950:return
1590 print"[147]this task will be almost identical to":print
1600 print"the second task. the difference is,":print
1610 print"however, that instead of a paragraph,":print
1620 print"color words will appear. remember, you":print
1630 print"must quickly recite out loud the color":print
1640 print"that the word is printed in, not the":print
1650 print"word itself.":gosub950:return
1660 poke53265,peek(53265)and239:print"[147]":forx=1to46
1670 cr(x)=int(rnd(1)*6)+1
1680 if cr(x)=cr(x-1) then 1670
1690 if cr(x)=1 then cw$(x)="green"
1700 if cr(x)=2 then cw$(x)="blue"
1710 if cr(x)=3 then cw$(x)="yellow"
1720 if cr(x)=4 then cw$(x)="gray"
1730 if cr(x)=5 then cw$(x)="red"
1740 if cr(x)=6 then cw$(x)="purple"
1750 next
1760 for x=1to46
1770 if pos(1)>=33 then print:print
1780 printcr$(x);cw$(x);" ";
1790 next
1800 poke53265,peek(53265)or16
1810 gosub 700:gosub 950:return
1820 f=20:no=1:nt=10:nn=1
1830 v=53248:i=249:rem video & image #
1840 poke 53280,0
1850 poke53281,14:poke 53265,peek(53265) and 239
1860 s=54272:forsd=stos+24:pokes,0:next
1870 pokes+24,15:pokes+2,0:pokes+5,129:pokes+6,65
1880