Oxygen Basic

Programming => Example Code => Topic started by: Peter on October 20, 2015, 08:55:40 AM

Title: Tropical
Post by: Peter on October 20, 2015, 08:55:40 AM
Hello,
Do you know jungle Sirpinski?  ???
Code: [Select]
include "asm.inc"
window 800,600,1

single a, b, k, r
sys  x1=400 ,x2=400,y1 ,y2

loadSprite "bmp/plant.bmp",1

for k=0 to 10000
r = rand(0,2)
if r=0 then
   x1=(x2 + 400) /2
   y1=(y2 / 2)
elseif r=1 then
   x1 = (x2 / 2)
   y1 = (y2 + 600) /2
elseif r=2 then
   x1 = (x2 + 800) /2
   y1 = (y2 + 600) /2
end if
a = y1/2.4
b = x1/3.2
zSprite 1,x1,y1,32,32,0
x2 = x1
y2 = y1
next

waitkey
winExit


[attachment deleted by admin]
Title: Re: Tropical
Post by: Mike Lobanovsky on October 20, 2015, 10:07:31 AM
Sierpinski in the Bush. :)