Guest_imported
New member
- Jan 1, 1970
- 0
I was wondering if anyone could look over this code and tell me how to fix it. I can't find the problem.
CLS
SCREEN 12
x = 320
x1 = 50
y1 = 50
xdir = 1
ydir = 1
LINE (5, 5)-(635, 420), 1, B
DO
LOOP UNTIL a$ = "q" OR a$ = "Q"
LINE (x - 32, 375)-(x + 32, 375), 0, BF
LINE (x - 30, 375)-(x + 30, 375), 15
LINE (x1 - 8, y1 - 8)-(x1 + 8, y1 + 8), 0, BF
CIRCLE (x1, y1), 7, 10
PAINT (x1, y1), 10, 10
a$ = INKEY$
IF a$ = CHR$(0) + CHR$(75) AND x > 10 + 30 THEN
x = x - 2
END IF
IF a$ = CHR$(0) + CHR$(77) AND x < 630 - 30 THEN
x = x + 2
END IF
IF x1 > 625 THEN xdir = -1
IF x1 < 15 THEN xdir = 1
IF y1 < 15 THEN ydir = 1
IF y1 = 365 AND x1 < x + 37 AND x1 > x - 37 THEN ydir = -1
x1 = x1 + xdir
y1 = y1 + ydir
IF y1 > 400 THEN END
CLS
SCREEN 12
x = 320
x1 = 50
y1 = 50
xdir = 1
ydir = 1
LINE (5, 5)-(635, 420), 1, B
DO
LOOP UNTIL a$ = "q" OR a$ = "Q"
LINE (x - 32, 375)-(x + 32, 375), 0, BF
LINE (x - 30, 375)-(x + 30, 375), 15
LINE (x1 - 8, y1 - 8)-(x1 + 8, y1 + 8), 0, BF
CIRCLE (x1, y1), 7, 10
PAINT (x1, y1), 10, 10
a$ = INKEY$
IF a$ = CHR$(0) + CHR$(75) AND x > 10 + 30 THEN
x = x - 2
END IF
IF a$ = CHR$(0) + CHR$(77) AND x < 630 - 30 THEN
x = x + 2
END IF
IF x1 > 625 THEN xdir = -1
IF x1 < 15 THEN xdir = 1
IF y1 < 15 THEN ydir = 1
IF y1 = 365 AND x1 < x + 37 AND x1 > x - 37 THEN ydir = -1
x1 = x1 + xdir
y1 = y1 + ydir
IF y1 > 400 THEN END