Check out a free preview of the full Build a Game Project: Feed-A-Star-Mole course:
The "Gone Status" Lesson is part of the full, Build a Game Project: Feed-A-Star-Mole course featured in this preview video. Here's what you'd learn in this lesson's course:

Brian assigns a status of "gone" to the moles, such that it shows the mole missing from its hole.

Get Unlimited Access Now

Transcript from the "Gone Status" Lesson

>> Brian Holt: So if a mole was gone and it's next comes up again, that means it's going to go to hungry, right?
>> Brian Holt: So the mole status here is going to be mole.status = hungry.
>> Brian Holt: = getHungryInterval. We'll have to decide how long that is.
>> Brian Holt: Okay, here we're gonna have to say, it's kind of the same thing up here, moles, no children all that stuff.

Remember, we wanted to have it like have the bird come over it, if the mole's hungry, so we have to add a class here. So, class list.add hungry. And we're going to have to remove,
>> Brian Holt: Make it a little smaller. Remove, gone, right, cuz it's no longer gone.

>> Brian Holt: Call it up there. So mole.children.class, we need to change the source here as well to be equal to ./mole-hungry.png.
>> Speaker 2: Do you need to do that with the children or just mole.node.src?
>> Brian Holt: Yeah, I messed 77 up. So it does have to be this, this is wrong.

Because, again, the node that we're referring to is the one that we have, mole.node is this one the whole. We actually need to grab the child. Yeah, yep, yep, yep. So, line 77 there, we're actually gonna have to say mole.node.children. Same thing that we were doing up there, children.0.