Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 House Generator!
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Prince Pwn




PostPosted: Sun Dec 17, 2006 10:34 pm   Post subject: House Generator!

I was bored and made this crummy little program =D

code:

procedure DrawHouse (StartX, StartY, EndX, EndY, Top, Col : int, Door : boolean)
    if Door then
        Draw.FillBox (((StartX + EndX) div 2) - 2, StartY, ((StartX + EndX) div 2) + 2, StartY + 5, brightred)
    end if
    Draw.Box (StartX, StartY, EndX, EndY, Col)
    Draw.Line (StartX, EndY, (StartX + EndX) div 2, EndY + Top, Col)
    Draw.Line (EndX, EndY, (StartX + EndX) div 2, EndY + Top, Col)
    Draw.Line (StartX + 1, EndY, EndX - 1, EndY, white)
end DrawHouse

var x, y : int := 0
var xrad : int := 40
var yrad : int := 10
var border : int := black

loop
    DrawHouse (x, y, x + xrad, y + yrad, yrad, border, true)
    x += xrad
    if x >= maxx then
        x := 0
        y += yrad * 2
    end if
    exit when y >= maxy
end loop

var picID : int := Pic.New (0, 0, maxx, maxy)
Mouse.ButtonChoose ("multibutton")
View.Set ("graphics;offscreenonly")
var mousex, mousey, button : int

loop
    Mouse.Where (mousex, mousey, button)
    Pic.Draw (picID, 0, 0, picCopy)
    if button = 1 then
        Draw.Fill (mousex, mousey, brightgreen, border)
    end if
    View.Update
end loop
Sponsor
Sponsor
Sponsor
sponsor
Voltage128




PostPosted: Wed Dec 20, 2006 5:06 pm   Post subject: (No subject)

uhm, whats it supposed to do? i opened it and im not sure what to do with it. If i click something it goes green?
Prince Pwn




PostPosted: Tue Dec 26, 2006 8:45 pm   Post subject: (No subject)

Just a small house generator =D
Doesn't really do anything but I was practicing with patterns and proc's with arguments.
John-O-McReily




PostPosted: Thu Apr 19, 2007 7:56 am   Post subject: RE:House Generator!

What the hell is the point of this !!!!!!
Ultrahex




PostPosted: Thu Apr 19, 2007 9:41 pm   Post subject: Re: House Generator!

These kind of programs do not need to be posted, it is almost like spam to most administrators on here...

The program does what he programmed it to do, which overall is not that great... (as you said it was crummy)

so ... why did you post crummy stuff, sure you programmed this and you may be proud of it, but you do not need to share with the rest of the world, if the program is useful then maybe i would post it, however it does not seem that way....

sorry for those who may be offended....

Please DON"T post "omfg sooo trippy cool flashes!"

Link above shows that we do not want this stuff on the forum, thanks.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: