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

Username:   Password: 
 RegisterRegister   
 help wit random placement of astroids
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
vagyb




PostPosted: Mon May 24, 2004 4:59 pm   Post subject: (No subject)

yep i am lol, once i'm done this part i'm gonna use whatdotcolor to do the detection hehe Very Happy
Sponsor
Sponsor
Sponsor
sponsor
guruguru




PostPosted: Mon May 24, 2004 6:23 pm   Post subject: (No subject)

Good idea! Just some ideas to make your code shorter and more comprehensive.

1. Take out all the number1 etc variables, you dont need them.

2. Since all your boulder pictures are the same, you dont have to make 4 picture variables. Just make one. The width and height will stay the same. However, you have to keep all the variables that determeine the position of a boulder. Then when you draw the boulders, just refer to the single picture. E.g. Pic.Draw (boulderPic, boulder1/2/3/4X, boulder1/2/3/4Y, picMerge).

3. setscreen() should always be called at the very top of the program only. You have an extra setscreen() on line 26 for some odd reason.

4. This is hard: Take out every and any reference to space, spacePic, spacHeight etc. Delete all those variables. It makes the program way too messy. Yes, you will have to change around some things. But the space variables are absoluely unncesary in this program. You do not need them. Period.

5. Idea: Convert all the info for your boulders into arrays. This will shorten your program, make it easier to program, and make it easier to read.

If you want to, try these things out. If you need any help with any of thsese, feel free to ask away.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 17 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: