programming

Posted on Updated on

Create a world that has at least 5 different objects from the Furniture Gallery and a Faery from the Fantasy/Faeries Gallery. The Faery has the power to make an object disappear. Everything that the faery touches disappears from the scene.

 

Create an interactive game where the user can click one object at a time from the scene; then the faery faces that object and moves toward it using random motion. Write a recursive method named CheckDistance that checks whether the faery is very close to the object clicked by the user. If it is, the faery bends over to touch the object. After the faery touches the object, the object disappears (this is the base case of the recursion). If the faery is not yet close enough to the object to be able to touch it, the faery moves a small distance forward and the CheckDistance method is recursively called (this is the recursive case of the recursion).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s