Abt. DAS DING
==========
Kam es aus der Tiefe? Ist es gefährlich? Frisst es Rechenzeit? Fragen über Fragen...
Code
if 0
$MAKE CL
endif :WindowTitle "DAS DING"
'(N) Noware, P.Specht - Ohne jegliche Gewähr! Wofür denn auch...
cls:font 2:var n&=260:declare x![n&],y![n&],s&:x![n&]=100:y![n&]=100:s&=5: rept:
Select rnd(8):caseof 0: x![n&]=x![n&]+s&
caseof 1: x![n&]=x![n&]+s&:y![n&]=y![n&]+s& : caseof 2: y![n&]=y![n&]+s&
caseof 3: x![n&]=x![n&]-s&:y![n&]=y![n&]+s& : caseof 4: x![n&]=x![n&]-s&
caseof 5: x![n&]=x![n&]-s&:y![n&]=y![n&]-s& : caseof 6: y![n&]=y![n&]-s&
caseof 7: x![n&]=x![n&]+s&:y![n&]=y![n&]-s& :endselect
if x![n&]>width(%HWnd):x![n&]=1:endif:if x![n&]<1:x![n&]=width(%HWnd)-1:endif
if y![n&]>height(%HWnd):y![n&]=1:endif:if y![n&]<1:y![n&]=height(%HWnd)-1:endif
usepen 0,2,rgb(0,0,200):rectangle x![n&]+3,(y![n&]+3) - (x![n&]-3),y![n&]-3
WhileLoop n&-1:x![&Loop]=x![&Loop+1]:y![&Loop]=y![&Loop+1]:endwhile
usepen 0,2,rgb(220,220,220):rectangle x![1]+3,(y![1]+3) - (x![1]-3),y![1]-3
if %csrlin>30:waitinput :cls:endif :goto "rept"
Alles anzeigen