Alice Community Simple Score Keeping

 Simple Score Keeping
 bstanard Guest   Status: Posts: n/a 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
DickBaldwin
Guest

Status:
Posts: n/a
12-05-2008, 03:58 PM

Quote:
 Originally Posted by bstanard 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

 Chris101b Senior Member     Status: Offline Posts: 361 Join Date: Jun 2007 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.
DickBaldwin
Guest

Status:
Posts: n/a
12-05-2008, 09:26 PM

Quote:
 Originally Posted by Chris101b 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

 bstanard Guest   Status: Posts: n/a 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

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops     Alice Player and VR General Discussion     Questions and Comments     The Lounge