I would suggest using the "getIntersectingObjects(Wall.class).size()>0": this checks whether there are any walls touching the character. You can then back up if it is touching. If you want, I can give you some example code (you probably want to try yourself first, though).
@danpost, I am not promoting it at all. I was just trying to point out that there is a weakness in the system (as a warning for people). I am sorry I did add those views. As a note though, on cuberunner, I only added a small fraction of those hits at the end. I believe what happened was that because I called it "Cube Runner" (the title of a somewhat popular game on the apple store) anytime someone searched for "cuberunner", my scenario came up in the top ten. I have since changed the title and the views stopped coming in.
Actually, there are easier ways to spam the site... I wrote a greenfoot program that accessed scenarios every act cycle to boost the view count. Greenfoot.org doesn't have a good way of testing whether it is a human or just a robot trying to access the page (google sites like youtube do though). Anyway, I only used it on two of my scenarios before I felt like I was cheating: everything except cube runner and textured cube are entirely legitimate counts. Besides, I don't think anyone can really put too much credibility into the number of views as a measure of popularity: voting is much more accurrate.
I was trying out gevaters suggestion and it didn't work:( I will keep working on it though: I need to figure out how to set the robot object to just my scenario.
2013/10/22
Wombat Conveyor
2013/10/21
Zombie Rescue Squad
2013/10/15
Blue Dot Clicker
2013/10/15
Blue Dot Clicker
2013/10/10
Viral Spiral
2013/9/29
Labrynth
2013/9/28
z-buffering
2013/9/28
Labrynth
2013/9/27
Labrynth