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

Username:   Password: 
 RegisterRegister   
 boring engineering project
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
WhatAmIDoing




PostPosted: Tue Apr 20, 2004 1:30 pm   Post subject: boring engineering project

This is a good use of GUI and it can be amusing for 15 dec so enjoy the moment.

import GUI
var circle : boolean := false
proc makecircle
circle := true
drawoval (maxx div 2 - 20, maxy div 2, 50, 50, red)
drawfillbox (0, maxy - 100, 200, maxy, white)
end makecircle
proc fillcircle
if circle = true then
var c : int
randint (c, 0, 50)
if c = red or c=white then
c += 1
end if
drawfill (maxx div 2 - 20, maxy div 2, c, red)
else
locate (1, 1)
put "No Circle to fill"
end if
end fillcircle
proc clear
circle := false
drawfilloval (maxx div 2 - 20, maxy div 2, 60, 60, white)
end clear
var box1 := GUI.CreateButton (10, 200, 0, "Make Circle", makecircle)
var box2 := GUI.CreateButton (10, 150, 0, "Clear Circle", clear)
var box3 := GUI.CreateButton (10, 250, 0, "Fill Circle", fillcircle)
var Quit := GUI.CreateButton (10, 100, 0, "Quit", GUI.Quit)
loop
exit when GUI.ProcessEvent
end loop
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Tue Apr 20, 2004 4:47 pm   Post subject: (No subject)

Wow...really short 15 seconds.

Try using [code] tags next time...for aesthetics sake.
No, not saké!
Paul




PostPosted: Tue Apr 20, 2004 6:28 pm   Post subject: (No subject)

It'd be more amusing if you'd closed the window.
WhatAmIDoing




PostPosted: Fri Apr 23, 2004 8:47 pm   Post subject: (No subject)

maybe but i did it in 5 min so what ever
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  [ 4 Posts ]
Jump to:   


Style:  
Search: