File: paddle.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (26 lines) | stat: -rw-r--r-- 372 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
print "Use the J and K keys to move the paddle"

fastgraphics

x = 30
y = 280
xinc = 5

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
  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
  refresh
  return