@@ -0,0 +1,999 @@
+package Westminster.Team5.marccarre.capabilities.events;%0A%0Aimport robocode.AdvancedRobot;%0Aimport robocode.Condition;%0A%0Apublic class OnWallTooClose extends Condition %7B%0A%09public static final String EVENT_NAME = OnWallTooClose.class.getSimpleName();%0A%0A%09private final AdvancedRobot robot;%0A%09private final double wallMargin;%0A%0A%09public OnWallTooClose(final AdvancedRobot robot, final double wallMargin) %7B%0A%09%09super(EVENT_NAME);%0A%09%09this.robot = robot;%0A%09%09this.wallMargin = wallMargin;%0A%09%7D%0A%0A%09@Override%0A%09public boolean test() %7B%0A%09%09return (leftWallTooClose() %7C%7C rightWallTooClose() %7C%7C topWallTooClose() %7C%7C bottomWallTooClose());%0A%09%7D%0A%0A%09private boolean leftWallTooClose() %7B%0A%09%09return (robot.getX() %3C= wallMargin);%0A%09%7D%0A%0A%09private boolean rightWallTooClose() %7B%0A%09%09return (robot.getX() %3E= robot.getBattleFieldWidth() - wallMargin);%0A%09%7D%0A%0A%09private boolean topWallTooClose() %7B%0A%09%09return (robot.getY() %3E= robot.getBattleFieldHeight() - wallMargin);%0A%09%7D%0A%0A%09private boolean bottomWallTooClose() %7B%0A%09%09return (robot.getY() %3C= wallMargin);%0A%09%7D%0A%7D%0A

Create OnWallTooClose.java