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

Username:   Password: 
 RegisterRegister   
 how to generate different odds of winning?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
yingmu




PostPosted: Sun Mar 06, 2005 9:42 pm   Post subject: how to generate different odds of winning?

i doing a horse racing game and i don't know how to generate different winning odds for each horse, pleaz help! and also how to make it so that when a picture move only one picture will appear without a whole bunch overlapping?
Sponsor
Sponsor
Sponsor
sponsor
guttface




PostPosted: Sun Mar 06, 2005 9:46 pm   Post subject: (No subject)

you could cls the whole screen and redraw it with the picture in the new position. also, you might be able to xor it but im not exactly sure how that works. as for the odds, you could use randint:
code:
randint(var_name, lower_bound,upper_bound)
to return a random number to be used for odds, and then maybe tie that number into the speed of the horse
guttface




PostPosted: Sun Mar 06, 2005 9:56 pm   Post subject: (No subject)

i forgot- u'll need to use
code:
setscreen("offscreenonly")
View.Update
tp prevent flickering when you redraw the screen
person




PostPosted: Mon Mar 07, 2005 3:31 pm   Post subject: (No subject)

didnt someone ask the same question yesterday?
[Gandalf]




PostPosted: Mon Mar 07, 2005 5:10 pm   Post subject: (No subject)

Ya, probably same assignment too!

http://www.compsci.ca/v2/viewtopic.php?t=8011
Flikerator




PostPosted: Mon Mar 07, 2005 8:18 pm   Post subject: (No subject)

[Gandalf] wrote:
Ya, probably same assignment too!

http://www.compsci.ca/v2/viewtopic.php?t=8011


Lolz thats funny. Why don't people just ask there teachers? *Rolls eyes*
AsianSensation




PostPosted: Mon Mar 07, 2005 8:24 pm   Post subject: (No subject)

Because the teacher also happen to use this site, and these people like to procrastinate till the last moment, so they contact the teachers the only way they know how: compsci.ca.
Flikerator




PostPosted: Mon Mar 07, 2005 8:28 pm   Post subject: (No subject)

AsianSensation wrote:
Because the teacher also happen to use this site, and these people like to procrastinate till the last moment, so they contact the teachers the only way they know how: compsci.ca.


That makes sense. Our teacher only "allowed" us to work at home. We wern't able to take turing school... Evil or Very Mad We had to get our own copies grr..
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Tue Mar 08, 2005 4:58 pm   Post subject: (No subject)

What?! That's bs, they should at least given you a copy if you needed one Rolling Eyes . And you weren't allowed to do Turing at school? What kind of a course is that Snooty
person




PostPosted: Tue Mar 08, 2005 5:40 pm   Post subject: (No subject)

if ur not allwed to do turing at school...wat do u do at school?????
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 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: