My student and I can’t figure out what is wrong with her code. The cake doesn’t change to the cut cake and why is the gray rectangle there? Is it because her animations are in frames?
Hi - I made a copy of her project and changed the code. You can see it here: https://studio.code.org/projects/gamelab/Fv7NV08wwcxCWZMl3l_RO9kEPqpMnZKyPVENykoi9yE
I added comments to explain what I did.
She saw the “gray squares” because she set up the cut cake sprites but didn’t give them an animation until later in her draw loop.
Looking at her animations, I made some assumptions that she wanted to show the cake getting smaller and then disappearing after ten clicks (cool idea!). So I added if some compound conditionals so that if the clicks were between 3 and 6, the user sees the half cake, then later the user sees the little bit of cake, and then it disappears as the student coded after ten clicks. I hope this helps!
Thanks so much! It worked!