I am working through the textbook on the first little-crab scenario. As instructed, I changed Crab's act() method to:
No matter how many times I click on "Compile" in the editor window or the main window, the Crab class is slashed out. If I hover over it, I see the message "Needs compile". Clicking Reset does not help.
My configuration is:
Greenfoot version 2.4.2 (Java version 1.8.0_31)
Virtual machine: Java HotSpot(TM) Client VM 25.31-b07 (Oracle Corporation)
Running on Windows 7 6.1 (x86)
Java Home: C:\Program Files (x86)\Greenfoot\jdk\jre
1 2 3 4 5 6 7 8 9 10 11 12 | public class Crab extends Actor { public void act() { move( 5 ); if (isAtEdge()) { turn( 17 ); } move( 5 ); } } |
