
-----------------------------------
TheFerret
Tue Mar 09, 2004 6:51 pm

Pyramid
-----------------------------------
This is a cool program that I have made, I made it at school during free time but forgot about it, I made this one at home and will put the other one up tommorow at school... The one at school is better...

UPDATED

/* Travis Baker
March 9, 2004
Pyramid
*/
setscreen ("graphics:400;400")
var x, y, x1, y1, col, col1, num : int
x := 0
y := 0
x1 := 400
y1 := 400
col := 1
col1 := 255
put "Enter number (Below 255)"
get num
cls
loop
    for i : 1 .. 400
        delay (1)
        x += 1
        y += 1
        x1 -= 1
        y1 -= 1
        col += 2
        if col >= 255 then
            col := 1
        end if
        drawbox (x, y, x1, y1, col)
        x += 1
        y += 1
        x1 -= 1
        y1 -= 1
        %col1-=num
        col1 := num + 23
        if col1 = 255 then
            col1 := 255
        end if
        drawbox (x, y, x1, y1, col1)
    end for
end loop




-----------------------------------
Paul
Tue Mar 09, 2004 7:28 pm


-----------------------------------
Hehe, it can be seen as a pyramid or tunnel :D what were you trying to do with
col1 and

col1-=num 
if col1=255  or col=255 or col= 255 then
            col := 1
        end if
        drawbox (x, y, x1, y1, col)
        x += 1
        y += 1
        x1 -= 1
        y1 -= 1
        %col1-=num
        col1 := num + 23
        if col1 = 255 then
            col1 := 255
        end if
        drawbox (x, y, x1, y1, col1)
        if x >= maxx then
            changex *=-1
            elsif x1>=maxx then 
            changex1*=-1
            elsif y>=maxy then
            changey*=-1
            elsif y1>=maxy then 
            changey1*=-1
            elsif x