- 注册时间
- 2005-7-31
- 最后登录
- 1970-1-1
|
发表于 2005-7-31 18:31:00
|
显示全部楼层
timerclose()
const word$(15)={"风","乘","五","开","第","孑","然","出","例","典","对","夜","凯","步","电"}
data 109,113,0,0,116,117,120,0,103,103,104,103,103,97,0,0,116,120,104,116,98,110,104,103,113,100,111,0,98,109,0,0,119,103,113,106,109,97,119,0,99,102,121,0,121,119,116,121,109,110,109,110,104,105,114,0,106,110,118,0
dim b1,b2,b3,b4
dim shared asc(4,15)
declare sub main(t)
declare function poi(a$,b$,c$,d$,mi,ma)
1 rs=poi("","五笔","帮助","",3,4)
if rs=3 then
cls
locate(1,5):print "剑影侠踪v3.0"
locate(3,6):print "作者:风"
locate(6,1):print "正在初始化……"
restore
for i=0 to 14
read b1
read b2
read b3
read b4
asc(0,i)=b1
asc(1,i)=b2
asc(2,i)=b3
asc(3,i)=b4
next i
main(1)
else if rs=4 then
cls
print "左键可删除一个字母"
print "声明:本游戏源程序完全开放"
print "任何人均可对其"
print "进行扩充并在网上发表"
pause
cls
end if
goto 1
end
sub main(t)
2 cls
print "输入时间/分"
input intime
if intime<1 then goto 2
cls
delay(10)
timeropen(10)
dim st,ti1,ti2,tist,ri
ri=0
tist=0
ti1=intime
ti2=0
st=0
dim key(4)
key(0)=0
key(1)=0
key(2)=0
key(3)=0
dim boat(2,2)
boat(0,0)=rnd(15)
boat(1,0)=144
boat(0,1)=rnd(15)
boat(1,1)=144
locate(6,1):print "五笔"
fillrect(131,93,158,95)
fillcircle(144,92,5)
line(140,90,138,88)
line(141,89,139,87)
10 k=getkey()
if keydetect()=1 then k=getkey()
line(135,84,140,89)
if k=135 then
tist=tist+1
if tist=10 then
ti2=ti2-1
if ti2=-1 then
ti2=59
ti1=ti1-1
if ti1=-1 then goto 1000
end if
locate(1,8):print " "
locate(1,8):print ti1;":";ti2
tist=0
end if
else if k=131 then
key(st)=0
if st>0 then st=st-1
locate(6,5+st):print " "
else
key(st)=k
locate(6,5+st):print chr$(k)
st=st+1
end if
clspart(boat(1,0),32,boat(1,0)+19,47)
boat(1,0)=boat(1,0)-6
if boat(1,0)<=0 then
locate(1,1):print " "
locate(1,1):print chr$(asc(0,boat(0,0)));chr$(asc(1,boat(0,0)));chr$(asc(2,boat(0,0)));chr$(asc(3,boat(0,0)))
boat(0,0)=rnd(15)
boat(1,0)=144
else
sysprtstrg(boat(1,0)+2,32,word$(boat(0,0)))
line(boat(1,0)+2,47,boat(1,0)+17,47)
end if
clspart(boat(1,1),64,boat(1,1)+19,79)
boat(1,1)=boat(1,1)-6
if boat(1,1)<=0 then
locate(1,1):print " "
locate(1,1):print chr$(asc(0,boat(0,1)));chr$(asc(1,boat(0,1)));chr$(asc(2,boat(0,1)));chr$(asc(3,boat(0,1)))
boat(0,1)=rnd(15)
boat(1,1)=144
else
sysprtstrg(boat(1,1)+2,64,word$(boat(0,1)))
line(boat(1,1)+2,79,boat(1,1)+17,79)
end if
if key(0)=asc(0,boat(0,0)) and key(1)=asc(1,boat(0,0)) and key(2)=asc(2,boat(0,0)) and key(3)=asc(3,boat(0,0)) then
clspart(boat(1,0),32,boat(1,0)+19,47)
clspart(32,79,80,95)
key(0)=0
key(1)=0
key(2)=0
key(3)=0
st=0
ri=ri+1
boat(0,0)=rnd(15)
boat(1,0)=144
lineclear(135,84,136,85)
else if key(0)=asc(0,boat(0,1)) and key(1)=asc(1,boat(0,1)) and key(2)=asc(2,boat(0,1)) and key(3)=asc(3,boat(0,1)) then
clspart(boat(1,1),61,boat(1,1)+19,79)
clspart(32,79,80,95)
key(0)=0
key(1)=0
key(2)=0
key(3)=0
st=0
ri=ri+1
boat(0,1)=rnd(15)
boat(1,1)=144
lineclear(135,84,136,85)
end if
if st=4 then
st=0
key(1)=0
key(2)=0
key(3)=0
clspart(32,79,80,95)
end if
goto 10
1000 cls
print "时间:";intime;"分"
print "正确:";ri
pause
end sub
function poi(a$,b$,c$,d$,mi,ma)
cls
dim po
clspart(40,1,45,94)
locate(2,8):print a$
locate(3,8):print b$
locate(4,8):print c$
locate(5,8):print d$
po=(mi-1)*16+10
line(40,po,45,po-5)
line(40,po-3,43,po)
500 k=getkey()
if k=128 then
po=po-16
if po<(mi-1)*16+10 then po=(ma-1)*16+10
else if k=129 then
po=po+16
if po>(ma-1)*16+10 then po=(mi-1)*16+10
else if k=13 then
poi=(po-10)/16+1
goto 501
end if
clspart(40,1,45,94)
line(40,po,45,po-5)
line(40,po-3,43,po)
goto 500
501 clspart(1,32,38,94)
end function |
|