|
|
cosmolet.BAS |
|
{* Космолет *}REM basic' Управление: ' a-налево ' d-направо ' w-вперед ' /-стрелять CLS SCREEN 12 WINDOW (0, 0)-(640, 480) Const pi = 3.1415926# xkor = 320 ykor = 240 puli = 5 Dim xz(7), yz(7), xe(7), ye(7), xp(puli), yp(puli), vxp(puli), vyp(puli), tll(puli) xz(1) = 0 xz(2) = 8 xz(3) = -8 xz(4) = 0 yz(1) = 20 yz(2) = -10 yz(3) = -10 yz(4) = 0 yz(6) = -20 yz(5) = -8 yz(7) = -8 xz(6) = 0 xz(5) = 4 xz(7) = -4 back: For i = 1 To 1000: Next i LINE (xe(1), ye(1))-(xe(2), ye(2)), 0 LINE (xe(4), ye(4))-(xe(2), ye(2)), 0 LINE (xe(4), ye(4))-(xe(3), ye(3)), 0 LINE (xe(1), ye(1))-(xe(3), ye(3)), 0 LINE (xe(5), ye(5))-(xe(6), ye(6)), 0 LINE (xe(7), ye(7))-(xe(6), ye(6)), 0 For i = 1 To puli {If tll(i) > 0 Then }CIRCLE (xp(i), yp(i)), 1, 0 {End If }Next i c$ = INKEY$ If c$ "" Then If ASC(c$) = 27 Then End End If For i = 1 To puli xp(i) = xp(i) + vxp(i) yp(i) = yp(i) + vyp(i) tll(i) = tll(i) - 1 If tll(i) < 0 Then tll(i) = 0 vxp(i) = 0 vyp(i) = 0 End If Next i If c$ = "d" Then l = l + 20 If c$ = "a" Then l = l - 20 If c$ = "w{ Then }v = v + .1 count = 1 End If {ВЫСТРЕЛ *********************************************** }If c$ = {/{ Then ' If ASC(c$) = 32 Then }}For i = 1 To puli If tll(i) = 0 Then vxp(i) = 8 * COS((90 - l) * pi / 180) vyp(i) = 8 * SIN((90 - l) * pi / 180) tll(i) = 200 xp(i) = xkor + vxp(i) yp(i) = ykor + vyp(i) Exit For End If Next i End If If c$ = "" Then v = 0 count = 0 End If If c$ = "w" Then vx = vx + v * COS((90 - l) * pi / 180) vy = vy + v * SIN((90 - l) * pi / 180) End If c$ = "" If l < 0 Then l = l + 360 If l > 360 Then l = l - 360 xkor = xkor + vx ykor = ykor + vy If xkor < 0 Then xkor = xkor + 640 If xkor > 640 Then xkor = xkor - 640 If ykor < 0 Then ykor = ykor + 480 If ykor > 480 Then ykor = ykor - 480 For i = 1 To 7 xpr = xz(i) ypr = yz(i) xe(i) = xpr * COS(l * pi / 180) + ypr * SIN(l * pi / 180) + xkor ye(i) = -xpr * SIN(l * pi / 180) + ypr * COS(l * pi / 180) + ykor Next i LINE (xe(1), ye(1))-(xe(2), ye(2)) LINE (xe(4), ye(4))-(xe(2), ye(2)) LINE (xe(4), ye(4))-(xe(3), ye(3)) LINE (xe(1), ye(1))-(xe(3), ye(3)) If count 0 Then LINE (xe(5), ye(5))-(xe(6), ye(6)) LINE (xe(7), ye(7))-(xe(6), ye(6)) End If For i = 1 To puli If tll(i) > 0 Then CIRCLE (xp(i), yp(i)), 1 End If Next i For i = 1 To 400: Next i GoTo back 07.08.2014 - Breakpoint - точка остановки 07.08.2014 - Топ-10 самых популярных приложений в Facebook 18.11.2013 - Панель управления и персонализация системы. Windows Vista 18.11.2013 - Логические и физические диски. Windows Vista 18.11.2013 - Удаление файлов и папок 01.11.2013 - Программирование дисковых подсистем: возможности 31.10.2013 - Windows8 или Windows7? 31.10.2013 - Windows8, игры |
|
Non-commercial fansite
|