All pastes #2092032 Raw Edit

Stuff

public text v1 · immutable
#2092032 ·published 2011-10-20 22:27 UTC
rendered paste body
	if (robot.look(IRobot.LEFT) == IRobot.WALL) { // Check left of the robot
		wallNumber = wallNumber + 1; // Add 1 to wallNumber if there is a wall to the left
	}
	
	if (robot.look(IRobot.RIGHT) == IRobot.WALL) { // Check right of the robot
		wallNumber = wallNumber +1; // Add 1 to wallNumber if there is a wall to the right
	}
	
	if (robot.look(IRobot.BEHIND) == IRobot.WALL) { // Check behind the robot
		wallNumber = wallNumber +1; // Add 1 to wallNumber if there is a wall behind
	}