clr
location 1,1
print "PbgjōɈړ@kŉEɈړ@{[łԂ̃Q[ł"
sleep 2000

system.io.inputblock=0

count=0
point=0
wait=10

by=1

main

@main
	sleep 10

	count=count+1
	if count>wait then count=0

	if count==0 then
		'EGCgt[v

		if 20==bx then
			'蔻
			if y<=by && (y+3)>=by then
				point=point+1
				up_flag=up_flag<>1
				if wait>3 then wait=10-point

			else
				point=0
				wait=10
			endif

			drow_flag=1
		endif

		if 21<bx then
			'͂ꔻ
			bx=0
			by=rand/143
			int by
			by=int
			if by<=0 then by=1
			right_flag=right_flag<>1
		endif

		if up_flag then
			bx=bx-1
		else
			bx=bx+1
		endif

		if by>=70 then
			right_flag=1
		endif
		if by<=1 then
			right_flag=0
		endif
		if right_flag then
			by=by-1
		else
			by=by+1
		endif

		if up_flag && bx==1 then
			up_flag=0
		endif


		drow_flag=1
	endif

	input c

	if c=="k" then
		y=y+1
		drow_flag=1
	endif

	if c=="j" then
		y=y-1
		drow_flag=1
	endif

	if c=="e" then
		system.io.inputblock=1
		end
	endif

	if y<1 then
		y=1
		drow_flag=1
	endif

	if y>68 then
		y=68
		drow_flag=1
	endif

	if drow_flag then
		display
		drow_flag=0
	endif

	goto @this
_@


@display
	clr
	for i=1 to 20
		location i,71
		print "|"
	next i
	location bx,by
	print "@"
	location 20,y
	print "____"
	location 21,y
	print point
_@


