1. bee.ex
- Posted by Pete Eberlein <xseal at HARBORSIDE.COM> Aug 07, 1998
- 527 views
-- bee.ex include graphics.e constant anzbee = 100 sequence g, p, pa, pa2 g = repeat(0, anzbee) p = repeat(0, anzbee) pa = repeat(0, anzbee) pa2 = repeat({0,0}, anzbee) for a = 1 to anzbee do g[a] = rand({7,7}) - 4 p[a] = rand({640,480}) - 1 pa[a] = rand({640,480}) - 1 end for if graphics_mode(18) then abort(1) end if while get_key() = -1 do draw_line(0, {pa2[1], pa[1]}) draw_line(14, {pa[1], p[1]}) pa2[1] = pa[1] pa[1] = p[1] p[1] = p[1] + g[1] g[1] = remainder(g[1] + rand({3,3}) - 2, 10) if p[1][1] < 8 or p[1][1] > 632 then g[1][1] = -g[1][1] end if if p[1][2] < 8 or p[1][2] > 472 then g[1][2] = -g[1][2] end if for a = 2 to anzbee do draw_line(0, {pa2[a], pa[a]}) draw_line(14, {pa[a], p[a]}) pa2[a] = pa[a] pa[a] = p[a] p[a] = p[a] + g[a] g[a] = remainder(g[a] + floor((p[1] - p[a])/100), 10) end for end while if graphics_mode(-1) then end if ---------------------- Happy buzzing, _______ ______ _______ ______ [ _ \[ _ ][ _ _ ][ _ ] [/| [_] |[/| [_\][/ | | \][/| [_\] | ___/ | _] | | | _] [\| [/] [\| [_/] [\| |/] [\| [_/] [_____] [______] [_____] [______] xseal at harborside.com ICQ:13466657 http://www.harborside.com/home/x/xseal/euphoria/