print "Use the J and K keys to move the paddle" 

fastgraphics

x = 30 
y = 280 
ballx = 30 
bally = 0 
ballxinc = 5 
ballyinc = 5 
xinc = 5 
speed = .04	## make speed smaller to play faster

loop1: 
a = key 
if a = 75 then x = x + 30 
if a = 74 then x = x - 30 
if x < 0 then x = 0 
if x > 200 then x = 200 
gosub drawpaddle 
gosub moveball 
gosub drawball 

refresh
goto loop1 

drawpaddle: 
color gray 
rect 0,0,300,300 
color darkblue 
rect x,y,100,10 
color blue 
rect x+1,y+1,98,8 
return 

moveball: 
ballx = ballx + ballxinc 
bally = bally + ballyinc 
if bally > 270 then gosub checkball 
if bally < 5 then ballyinc = -ballyinc 
if ballx > 295 then ballxinc = -ballxinc 
if ballx < 5 then ballxinc = -ballxinc 
pause speed
return 

checkball: 
if ballx < x - 3 then goto missed 
if ballx > (x + 103) then goto missed 
ballyinc = -ballyinc 
ballxinc = ((ballx - x) - 50) / 10 
return 

missed: 
print "You Missed!!" 
bally = 10 
return 

drawball: 
color black 
circle ballx, bally, 5
color white
circle ballx, bally, 4
return 
