Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Lab 4 Help with score part of assignment (http://www.alice.org/community/showthread.php?t=11635)

Mauricio 11-14-2016 08:37 PM

Lab 4 Help with score part of assignment
 
I am at a total and complete loss as far as the scoring part of Lab 4, I have an if/Else statement inside a While loop with the instructions for the rings to fall and a variable that counts. The program counts not in order and with out catching the rings, however I cannot seem to get the program to only count when I try to catch the ring. I am not looking for the solution, just perhaps so direction perhaps some thoughts as far as how to go about get the count to work. The two variables that I have for the score are number variables one that is called scoredRings and missedRings. Any help that anyone can provide would be very much appreciated. Thank you.

chickentree 11-14-2016 09:08 PM

Ring score
 
[QUOTE=Mauricio;57414]I am at a total and complete loss as far as the scoring part of Lab 4, I have an if/Else statement inside a While loop with the instructions for the rings to fall and a variable that counts. The program counts not in order and with out catching the rings, however I cannot seem to get the program to only count when I try to catch the ring. I am not looking for the solution, just perhaps so direction perhaps some thoughts as far as how to go about get the count to work. The two variables that I have for the score are number variables one that is called scoredRings and missedRings. Any help that anyone can provide would be very much appreciated. Thank you.[/QUOTE]

1) Please don't double post.
2) If I understand what you are looking for the best way I can think of is to set up events that will be triggered when a ring is either caught or missed and update the appropriate count.
Another way might be to add variables to each ring to keep track of whether the ring was caught or missed and check the status. Lists would be good for this.

Mark


All times are GMT -5. The time now is 10:14 PM.

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