|
barkanoid.BAS |
|
{* Арканоид *}REM basic ' Игра арканоид
SCREEN 9 { my first arcanoid ;-)
}{c v - uvelichenie umenshenie, x z - pravo levo
}7 CLS
RANDOMIZE TIMER
x0 = 10: x1 = 70: y0 = 300: n = 20
x = 130 {320
}y = 130 {170
}r = 20
h = 1
w = 1
LINE (0, 0)-(601, 350), 10, B
SLEEP 2
Do
CIRCLE (x, y), r
For q = 1 To 3000
Next q
CIRCLE (x, y), r, o
x = x + w
y = y + h
If x > 595 - r Then w = -w
If x < r + 11 Then w = -w
If y < r + 10 Then h = -h
If x0 < x And x1 > x And y0 = y + r Then h = -h
k$ = INKEY$
If k$ = " " Then GoTo 7
If k$ = "c" Then x1 = x1 + 20
If k$ = "v" Then x1 = x1 - 20
If k$ = "x" Then x0 = x0 + n: x1 = x1 + n
If k$ = "z" Then x0 = x0 - n: x1 = x1 - n
LINE (0, y0)-(x0, y0), 0, B
LINE (x0, y0)-(x1, y0), 11, B
LINE (x1, y0)-(640, y0), 0, B
Loop
End
|