Alice Community  

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

Reply
 
Thread Tools Display Modes
Simple Score Keeping
Old
bstanard
Guest
 
Status:
Posts: n/a
Default Simple Score Keeping - 12-05-2008, 12:31 PM

I'm asking my middle schoolers to build a game, and I'm wondering what is the very simplest method of keeping score. For instance, every time a shark "eats" a fish, the shark's score is incremented by one point. Any ideas?
Thanks,
Bill
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 12-05-2008, 03:58 PM

Quote:
Originally Posted by bstanard View Post
I'm asking my middle schoolers to build a game, and I'm wondering what is the very simplest method of keeping score. For instance, every time a shark "eats" a fish, the shark's score is incremented by one point. Any ideas?
Thanks,
Bill
I assume you are asking how to display the score. One approach is to use the say method and let the shark display her own score.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
Chris101b
Senior Member
 
Chris101b's Avatar
 
Status: Offline
Posts: 361
Join Date: Jun 2007
Default 12-05-2008, 08:29 PM

I think he is asking how the shark can keep track of how many fish he has eaten. So that if it eats ten fish, the score at the top will say 10. I am not good at programming games, so I cant help you. But I thought that I would just clarify the question.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 12-05-2008, 09:26 PM

Quote:
Originally Posted by Chris101b View Post
I think he is asking how the shark can keep track of how many fish he has eaten. So that if it eats ten fish, the score at the top will say 10. I am not good at programming games, so I cant help you. But I thought that I would just clarify the question.
Just initialize a counter variable to zero and then increment it by one each time the shark eats a fish.

Then maybe let the shark burp and display the total fish eaten in a say bubble. (You can probably find a burp sound file on the web somewhere.)

See http://www.dickbaldwin.com/alice/Alice0140.htm for information on how to program variables in Alice.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
bstanard
Guest
 
Status:
Posts: n/a
Default 12-07-2008, 05:22 PM

Thanks, Dick and Chris... Exactly what I needed to get going. Dick, Your on line tutorials are first rate!
Regards,
Bill
   
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.