Question: Learning to program with Alice ( THE PROGRAMMING LANGUAGE IS ALICE) MidasTouch1 A magician has cast a spell on Alice. The effect of the magicians
Learning to program with Alice ( THE PROGRAMMING LANGUAGE IS ALICE)
MidasTouch1 A magician has cast a spell on Alice. The effect of the magicians spell is to give Alice the Midas touch. Everything she touches turns to gold. Alice is facing the candycane. (Use PointAt to make this alignment.) Write a recursive method, named CheckCandy, that checks whether Alices right hand is very close to the candycane (within 1 meter). If it is, Alice bends over to touch the candycane. After Alice touches the candycane, the candycane turns to gold (color changes to yellow). If Alice is not yet close enough to the candycane to be able to touch it, Alice moves a small distance forward ( one-tenth meter) and the CheckCandy method is recursively called.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
