package ch.jp.robwar; /** * This class shows a simple robot brain that will follow walls. * * @author JP Martin * @date 8.26.1998 */ public class WallFollower implements RobotBrain { /** * This function is called by the simulation for each time step. * It returns the orders that the robot brain gives to the robot body. */ public Instructions nextMove(Feedback senses) { if (senses.stimuli.hitObstacle) { return new Instructions(2.0,0.1,false); } else { return new Instructions(0.0,0.1,false); } } }