home *** CD-ROM | disk | FTP | other *** search
- 5 ifx=0thenpoke56,64:clr:x=1:load"born.lnk",8,1
- 10 :
- 20 nq=35:dimq%(nq),q$(nq),a$(nq),ab$(nq),ar$(nq),aw$(nq),qs%(nq),as%(nq)
- 21 dim p%(29,1)
- 30 :
- 40 q=6
- 50 :
- 90 :
- 100 open2,8,2,"born.xy":forp=1to29:input#2,p%(p,0),p%(p,1):next:close2
- 101 open2,8,2,"born.questions":input#2,dd:forp=1tonq
- 102 input#2,q$(p),a$(p),ab$(p),ar$(p),aw$(p),qs%(p),as%(p):gosub10000:next:close2
- 103 sys50759,"press a key",14*8,24*8
- 104 :
- 105 gosub11000
- 108 poke198,0:wait198,1:getk$
- 109 gosub 940
- 110 gosub750:c=0
- 130 gosub940
- 140 forqx=1tonq:qu=q%(qx)
- 150 gosub940:remplotusa
- 160 ag=99:ifqs%(qu)<>0thengosub13000:remplotquestionshape
- 165 gosub740
- 170 ag=99
- 172 if ab$(qu)="cap"thensys50759,"what is the capital of",2*8,21*8
- 173 sys50759,q$(qu),2*8,22*8
- 180 gosub950:gosub910:remgetanswer
- 190 gosub20000:remprocessanswer
- 191 ifa$=""ora$=" "thensys50759,"**** be realistic... ****",8*8,24*8:goto170
- 192 ifxr=2thenif(len(a$)<3ora$=a$(qu)ora$=ab$(qu))then200
- 194 ifxr>.5thensys50759,"that's close. try again.",8*8,24*8:goto170
- 200 ifa$=a$(qu)ora$=ab$(qu)thengosub15000:remshowrightanswerresponse
- 205 ifa$<>a$(qu)thenifa$<>ab$(qu)thengosub16000:remshowwronganswerresponse
- 210 ifas%(qu)<>0thengosub14000:remshowanswershape
- 215 gosub1082:gosub940
- 500 nextqx:qx=nq
- 600 print"[147][158]"
- 602 sys51459
- 604 print"[217]ou have correctly answered":print:printc"questions out of"qx"."
- 606 print"[212]hat's"int((c/qx)*100)"[157]%":print:print:print
- 610 goto1090
- 740 return
- 750 rem *** sound effect ***
- 760 return
- 890 rem *** sound effect ***
- 900 rem *** sound effect ***
- 910 ifa$="quit"thensys51459:print"[147][212]hank you for playing...":goto1090
- 920 return
- 930 poke249,224:poke250,204:poke251,0:poke252,64
- 932 poke253,p%(p,0):poke254,p%(p,1)
- 934 poke255,p-1:sys51462
- 936 return
- 938 :
- 940 h=0:v=0:p=1:gosub930:return
- 945 :
- 950 a$=""
- 960 xp=2:yp=23
- 962 getk$:ifk$<>""then970
- 965 ifcr$="("thencr$=")":goto967
- 966 cr$="("
- 967 sys50759,cr$,xp*8,yp*8:goto962
- 970 ifk$=chr$(13)then1010
- 975 ifk$<>"[157]"andk$<>""then980
- 976 ifxp>2thenxp=xp-1:sys50759," ",xp*8,yp*8:a$=left$(a$,len(a$)-1):goto962
- 980 if(k$>"z"ork$<"a")andk$<>" "andk$<>"."then962
- 981 ifxp=38then962
- 982 sys50759,k$,xp*8,yp*8:xp=xp+1
- 985 a$=a$+k$
- 990 goto962
- 1010 gosub1060:return
- 1020 iflen(a$)<2thena$="":goto1040
- 1030 a$=left$(a$,len(a$)-1)
- 1040 ht=1:printa$" "b$;:k$=""
- 1050 return
- 1060 iflen(a$)<1ora$=" "thenreturn
- 1070 ifright$(a$,1)=" "thena$=left$(a$,len(a$)-1):goto1060
- 1075 ifleft$(a$,1)=" "thena$=mid$(a$,2):goto1060
- 1080 return
- 1082 sys50759," press a key ( 'q' to quit )",0,24*8
- 1083 poke198,0:wait198,1:getk$:ifk$="q"then600
- 1084 return
- 1090 vt=21:poke53281,1:print"[144][196]o you want to try again? ([217]/[206])";
- 1100 poke198,0:wait198,1:getk$
- 1110 ifk$="y"thenrestore:print:print"[207][203][193][217]. [202]ust a second...":gosub11000
- 1112 ifk$="y"thensys51459:goto110
- 1120 ifk$<>"[206]"thenifk$<>"n"thengosub900:goto1090
- 1130 :
- 1140 print"[147]":open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
- 1142 ifer<>63thenend
- 1145 load"hello connect",8
- 1150 end
- 10000 return
- 10005 ifab$(p)<>"cap"thenreturn
- 10010 ar$(p)="you are right! the capital of "
- 10012 iflen(ar$(p))<40thenar$(p)=ar$(p)+" ":poke53280,rnd(1)*15: goto10012
- 10014 ar$(p)=ar$(p)+q$(p)+" is "+a$(p)+"."
- 10020 aw$(p)="sorry! the capital of "
- 10022 iflen(aw$(p))<40thenaw$(p)=aw$(p)+" ":poke53280,rnd(1)*15: goto10022
- 10024 aw$(p)=aw$(p)+q$(p)+" is "+a$(p)+"."
- 10030 q$(p)="what is the capital of this state?"
- 10040 ab$(p)=a$(p)
- 10050 return
- 11000 forp=1tonq:q%(p)=p:next:forp=1tonq:gosub11010:next:return
- 11010 qd=rnd(1)*nq+1
- 11020 t=q%(p):q%(p)=q%(qd):q%(qd)=t
- 11050 return
- 13000 p=qs%(qu):gosub930:return
- 14000 forcz=1toq:gosub940:p=as%(qu):gosub930:next:return
- 15000 c=c+1:gosub890
- 15005 remifas%(qu)=0then15015
- 15010 remforcz=1toq:gosub940:p=as%(qu):gosub930:next
- 15012 sys50759," ",2*8,21*8
- 15015 sys50759," that's absolutely right!! ",2*8,22*8
- 15017 sys50759," ",2*8,23*8
- 15018 sys50759," ",2*8,24*8
- 15019 fordl=1to1000:next
- 15020 return
- 16000 p=1:gosub 930
- 16001 gosub900:a$="nope, that's not it!":sys50759,a$,int(20-len(a$)/2)*8,21*8
- 16002 if ab$(qu)<>"cap"then16007
- 16003 p=qs%(qu):gosub 930
- 16004 a$="the capital of "+q$(qu):sys50759,a$,int(20-len(a$)/2)*8,22*8
- 16005 a$="is "+a$(qu):sys50759,a$,int(20-len(a$)/2)*8,23*8:goto16010
- 16007 a$="the correct answer is -":sys50759,a$,int(20-len(a$)/2)*8,22*8
- 16008 sys50759,a$(qu),int(20-len(a$(qu))/2)*8,23*8
- 16009 fordl=1to1000:next
- 16010 return
- 20000 iflen(a$)<3thenxr=2:return:remifabbrevmustberight
- 20010 x0=0:xl=len(a$):iflen(a$(qu))<xlthenxl=len(a$(qu))
- 20012 forx1=1toxl
- 20020 ifmid$(a$,x1,1)=mid$(a$(qu),x1,1)thenx0=x0+1
- 20030 next
- 20040 forx1=len(a$(qu))tolen(a$(qu))-xl+1step-1
- 20050 ifmid$(a$,x1,1)=mid$(a$(qu),x1,1)thenx0=x0+1
- 20060 next
- 20070 xr=x0/len(a$(qu))
- 20080 return
-