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

Username:   Password: 
 RegisterRegister   
 A Freaky sOuNdInG Animation
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
exploitmonkey




PostPosted: Wed Dec 29, 2004 8:03 pm   Post subject: A Freaky sOuNdInG Animation

Turn up your speakers ! Note: Do not view if you are photosensitive!!!

code:


loop
    var i : int
    i := Rand.Int (1, 255)

    drawfillbox (0, 0, maxx, maxy, i)
    delay (10)
    %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>OVALS
    var t : int
    t := Rand.Int (0, maxy)
    var u : int
    u := Rand.Int (1, 255)
    var j : int
    j := Rand.Int (0, maxx)
    drawfilloval (j, t, 50, 50, u)


    var w : int
    w := Rand.Int (400, 2500)
    sound (w, 80)
end loop

Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Wed Dec 29, 2004 10:24 pm   Post subject: (No subject)

You don't need to make your own code tags: just use [ code][ /code] Wink
The only reason your code is understandable is because it is short. Were the code longer, it would (unnecessarily) take far too much effort to understand it. To fix this, use more descriptive variables.
Here's my suggestions:
Replace i with background_Colour
Replace t with oval_Y
Replace j with oval_X
Replace u with oval_Colour

If you use those variable names, people might be able to easily understand what the variables do without having to look at the entire program. Really, why are you using t and u to represent y and x, respectively?
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  [ 2 Posts ]
Jump to:   


Style:  
Search: