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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started