Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
I Need help with a horse race game
Old
invaderzimpoo
Guest
 
Status:
Posts: n/a
Default I Need help with a horse race game - 10-15-2007, 12:53 AM

I'm supposed to be using the "racehorsegame" object in the amusement park folder and then when a horse is clicked on all 3 the horses move torwards the finish line random distances and when the horses get to the finish line if the horse the user clicks a win or loss message should be displayed.

I need to know how to create the finish line check function. i believe i can just do 3 if/else conditions for each horse and do "distance to finish line = .5" bc the distance is measured from the middle of the horse. but i have no idea how to link that up with the function determining if the horse the user clicks on wins the race and/or how to even create that function.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 10-15-2007, 08:34 AM

How about using a single if-else statement where the conditional clause contains the logical OR of three conditions, one for each horse?

Overall, it sounds like you could make good use of the free online Alice programming tutorials at http://www.dickbaldwin.com/tocalice.htm

Dick Baldwin
http://www.dickbaldwin.com/tocalice.htm
http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.