PDA

View Full Version : Problems with arrayList?


Velochicdunord
06-23-2011, 03:49 PM
Good afternoon,

I'm posting this question for one of our daycampers. He has created a game modelled on PacMan where the character "eats" dots. When the character gets to the dot, it's visibility is set to change to "false". However, we can only do this to about half the dots before the function stops working.

We are not getting any error messages.

I'm an intermediate Alice user and am not sure why this isn't working. Our day camper would really really like to figure out what the problem is and how to fix it. Any ideas?

Velochicdunord

legolizard
06-23-2011, 04:16 PM
I believe the problem lay in two places. First, the "pacman" is positioned so that he is looking slightly upward, this then causing the pacman to slowly move upward, and eventually making him to far from the dots; move closer to him with the camera and you'll see what I mean. The second problem lay in the eatDots method within the if statement I think you should put everything inside a doTogethor{}.