eventNames;
-
- private IBasicRobot robot;
- private BasicRobotProxy robotProxy;
-
- /**
- * Constructs a new EventManager.
- *
- * @param robotProxy the robot proxy that this event manager applies to.
- */
- public EventManager(BasicRobotProxy robotProxy) {
- this.robotProxy = robotProxy;
- eventQueue = new EventQueue();
-
- registerEventNames();
- reset();
- }
-
- /**
- * Adds an event to the event queue.
- * @param event is the event to add to the event queue.
- */
- public void add(Event event) {
- if (!HiddenAccess.isCriticalEvent(event)) {
- final int priority = getEventPriority(event.getClass().getName());
- HiddenAccess.setEventPriority(event, priority);
- }
- addImpl(event);
- }
-
- /**
- * Internal method for adding an event to the event queue.
- * @param event is the event to add to the event queue.
- */
- private void addImpl(Event event) {
- if (eventQueue != null) {
- if (eventQueue.size() > MAX_QUEUE_SIZE) {
- robotProxy.println(
- "Not adding to " + robotProxy.getStatics().getName() + "'s queue, exceeded " + MAX_QUEUE_SIZE
- + " events in queue.");
- } else {
- HiddenAccess.setEventTime(event, getTime());
- eventQueue.add(event);
- }
- }
- }
-
- /**
- * Adds an custom event to the event queue based on a condition.
- * @param condition is the condition that must be met in order to trigger the custom event.
- */
- public void addCustomEvent(Condition condition) {
- customEvents.add(condition);
- }
-
- /**
- * Removes all events from the event queue.
- * @param includingSystemEvents {@code true} if system events must be removed as well;
- * {@code false} if system events should stay on the event queue.
- */
- public void clearAllEvents(boolean includingSystemEvents) {
- eventQueue.clear(includingSystemEvents);
- // customEvents.clear(); // Custom event should not be cleared here
- }
-
- /**
- * Cleans up the event queue.
- *
- * This method should be called when the event queue is no longer needed,
- * i.e. before it must be garbage collected.
- */
- public void cleanup() {
- // Remove all events
- reset();
-
- // Remove all references to robots
- robot = null;
- robotProxy = null;
- }
-
- /**
- * Returns a list containing all events currently in the robot's queue.
- */
- public List getAllEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- events.add(e);
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all BulletHitBulletEvents currently in the robot's queue.
- */
- public List getBulletHitBulletEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof BulletHitBulletEvent) {
- events.add((BulletHitBulletEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all BulletHitEvents currently in the robot's queue.
- */
- public List getBulletHitEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof BulletHitEvent) {
- events.add((BulletHitEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all BulletMissedEvents currently in the robot's queue.
- */
- public List getBulletMissedEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof BulletMissedEvent) {
- events.add((BulletMissedEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all HitByBulletEvents currently in the robot's queue.
- */
- public List getHitByBulletEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof HitByBulletEvent) {
- events.add((HitByBulletEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all HitRobotEvents currently in the robot's queue.
- */
- public List getHitRobotEvents() {
- List events = new ArrayList();
-
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof HitRobotEvent) {
- events.add((HitRobotEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all HitWallEvents currently in the robot's queue.
- */
- public List getHitWallEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof HitWallEvent) {
- events.add((HitWallEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all RobotDeathEvents currently in the robot's queue.
- */
- public List getRobotDeathEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof RobotDeathEvent) {
- events.add((RobotDeathEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all ScannedRobotEvents currently in the robot's queue.
- */
- public List getScannedRobotEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof ScannedRobotEvent) {
- events.add((ScannedRobotEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all MessageEvents currently in the robot's queue.
- */
- public List getMessageEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof MessageEvent) {
- events.add((MessageEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns a list containing all StatusEvents currently in the robot's queue.
- */
- public List getStatusEvents() {
- List events = new ArrayList();
- synchronized (eventQueue) {
- for (Event e : eventQueue) {
- if (e instanceof StatusEvent) {
- events.add((StatusEvent) e);
- }
- }
- }
- return events;
- }
-
- /**
- * Returns the priority of the current top event.
- */
- public int getCurrentTopEventPriority() {
- return currentTopEventPriority;
- }
-
- /**
- * Returns the current top event.
- */
- public Event getCurrentTopEvent() {
- return currentTopEvent;
- }
-
- /**
- * Checks if events with a specific event priority are interruptible.
- * @param priority is the event priority that must be checked.
- * @see #setInterruptible(int, boolean)
- */
- public boolean isInterruptible(int priority) {
- return interruptible[priority];
- }
-
- /**
- * Sets the robot that will receive events dispatched from the event queue.
- * @param robot is the robot that will receive event dispatched from the event queue.
- */
- public void setRobot(IBasicRobot robot) {
- this.robot = robot;
- }
-
- /**
- * Returns the priority of a ScannedRobotEvent.
- */
- public int getScannedRobotEventPriority() {
- return dummyScannedRobotEvent.getPriority();
- }
-
- /**
- * Returns the current time/turn of the battle round.
- */
- public long getTime() {
- return robotProxy.getTimeImpl();
- }
-
- /**
- * This is the heart of the event manager, which processes the events for a robot.
- */
- public void processEvents() {
- // Remove old events
- eventQueue.clear(getTime() - MAX_EVENT_STACK);
-
- // Process custom events
- for (Condition customEvent : customEvents) {
- boolean conditionSatisfied = callUserCode(customEvent);
- if (conditionSatisfied) {
- addImpl(new CustomEvent(customEvent));
- }
- }
-
- // Sort the events based on the time and priority of the events
- eventQueue.sort();
-
- // Process event queue here
- Event currentEvent;
- while ((currentEvent = (eventQueue.size() > 0) ? eventQueue.get(0) : null) != null
- && currentEvent.getPriority() >= currentTopEventPriority) {
-
- if (currentEvent.getPriority() == currentTopEventPriority) {
- if (currentTopEventPriority > Integer.MIN_VALUE && isInterruptible(currentTopEventPriority)) {
- setInterruptible(currentTopEventPriority, false); // we're going to restart it, so reset.
-
- // We are already in an event handler, took action, and a new event was generated.
- // So we want to break out of the old handler to process it here.
- throw new EventInterruptedException(currentEvent.getPriority());
- }
- break;
- }
-
- int oldTopEventPriority = currentTopEventPriority;
-
- currentTopEventPriority = currentEvent.getPriority();
- currentTopEvent = currentEvent;
-
- eventQueue.remove(currentEvent);
- try {
- dispatch(currentEvent);
-
- setInterruptible(currentTopEventPriority, false);
-
- } catch (EventInterruptedException e) {
- currentTopEvent = null;
- } catch (RuntimeException e) {
- currentTopEvent = null;
- throw e;
- } catch (MyException e) {
- currentTopEvent = null;
- throw e;
- } finally {
- currentTopEventPriority = oldTopEventPriority;
- }
- }
- }
-
- /**
- * Checks if the user's condition for a custom event is satisfied.
- * @param condition is the condition to check.
- * @return {@code true} if the condition is satisfied; {@code false} otherwise.
- */
- private boolean callUserCode(Condition condition) {
- boolean conditionSatisfied;
- robotProxy.setTestingCondition(true);
- try {
- conditionSatisfied = condition.test();
- } finally {
- robotProxy.setTestingCondition(false);
- }
- return conditionSatisfied;
- }
-
- /**
- * Dispatches an event for a robot.
- *
- * Too old events will not be dispatched and a critical event is always dispatched.
- *
- * @param event the event to dispatch to the robot.
- */
- private void dispatch(Event event) {
- if (robot != null && event != null) {
- try {
- // skip too old events
- if ((event.getTime() > getTime() - MAX_EVENT_STACK) || HiddenAccess.isCriticalEvent(event)) {
- HiddenAccess.dispatch(event, robot, robotProxy.getStatics(), robotProxy.getGraphicsImpl());
- }
- } catch (Exception ex) {
- robotProxy.println("SYSTEM: " + ex.getClass().getName() + " occurred on " + event.getClass().getName());
- ex.printStackTrace(robotProxy.getOut());
- }
- }
- }
-
- /**
- * Removes the custom event with the specified condition from the event queue.
- * @param condition is the condition of the custom event to remove.
- */
- public void removeCustomEvent(Condition condition) {
- customEvents.remove(condition);
- }
-
- /**
- * Removes all custom events from the event queue.
- */
- public void resetCustomEvents() {
- customEvents.clear();
- }
-
- /**
- * Resets this event manager by removing all events from the event queue.
- */
- public synchronized void reset() {
- currentTopEventPriority = Integer.MIN_VALUE;
- clearAllEvents(true);
- customEvents.clear();
- }
-
- /**
- * Changes the interruptible flag for events with a specific priority.
- * When an event is interrupted, events with the same priority are allowed to restart the event handler.
- *
- * @param priority is the priority of the event to set the interruptible flag for.
- * @param isInterruptable {@code true} if events with the specified priority must be interruptible
- * allowing events with the same priority to restart the event handler.
- * {@code false} if events with the specified priority must not be interruptible
- * disallowing events with the same priority to restart the event handler.
- */
- public void setInterruptible(int priority, boolean isInterruptable) {
- if (priority >= 0 && priority < MAX_PRIORITY) {
- interruptible[priority] = isInterruptable;
- }
- }
-
- /**
- * Returns the priority of events belonging to a specific class.
- * @param eventClass is a string with the full class name of the event type to get the priority from.
- * @return the event priority of the specified event class.
- * @see robocode.Event#getPriority()
- */
- public int getEventPriority(String eventClass) {
- if (eventClass == null) {
- return -1;
- }
- final Event event = eventNames.get(eventClass);
- if (event == null) {
- return -1;
- }
- return event.getPriority();
- }
-
- /**
- * Sets the event priority of events belonging to a specific class.
- * @param eventClass is a string with the full class name of the event type to set the priority for.
- * @param priority is the new priority
- */
- public void setEventPriority(String eventClass, int priority) {
- if (eventClass == null) {
- return;
- }
- final Event event = eventNames.get(eventClass);
- if (event == null) {
- robotProxy.println("SYSTEM: Unknown event class: " + eventClass);
- return;
- }
- if (HiddenAccess.isCriticalEvent(event)) {
- robotProxy.println("SYSTEM: You may not change the priority of a system event.");
- }
- HiddenAccess.setEventPriority(event, priority);
- }
-
- /**
- * Registers the full and simple class names of all events used by {@link #getEventPriority(String)} and
- * {@link #setEventPriority(String, int)} and sets the default priority of each event class.
- */
- private void registerEventNames() {
- eventNames = new HashMap();
- dummyScannedRobotEvent = new ScannedRobotEvent(null, 0, 0, 0, 0, 0, false);
- registerEventNames(new BattleEndedEvent(false, null));
- registerEventNames(new BulletHitBulletEvent(null, null));
- registerEventNames(new BulletHitEvent(null, 0, null));
- registerEventNames(new BulletMissedEvent(null));
- registerEventNames(new DeathEvent());
- registerEventNames(new HitByBulletEvent(0, null));
- registerEventNames(new HitRobotEvent(null, 0, 0, false));
- registerEventNames(new HitWallEvent(0));
- registerEventNames(new KeyPressedEvent(null));
- registerEventNames(new KeyReleasedEvent(null));
- registerEventNames(new KeyTypedEvent(null));
- registerEventNames(new MessageEvent(null, null));
- registerEventNames(new MouseClickedEvent(null));
- registerEventNames(new MouseDraggedEvent(null));
- registerEventNames(new MouseEnteredEvent(null));
- registerEventNames(new MouseExitedEvent(null));
- registerEventNames(new MouseMovedEvent(null));
- registerEventNames(new MousePressedEvent(null));
- registerEventNames(new MouseReleasedEvent(null));
- registerEventNames(new MouseWheelMovedEvent(null));
- registerEventNames(new PaintEvent());
- registerEventNames(new RobotDeathEvent(null));
- registerEventNames(new RoundEndedEvent(0, 0, 0));
- registerEventNames(dummyScannedRobotEvent);
- registerEventNames(new SkippedTurnEvent(0));
- registerEventNames(new StatusEvent(null));
- registerEventNames(new WinEvent());
-
- // same as any line above but for custom event
- final DummyCustomEvent customEvent = new DummyCustomEvent();
- eventNames.put("robocode.CustomEvent", customEvent); // full name with package name
- eventNames.put("CustomEvent", customEvent); // only the class name
- }
-
- /**
- * Registers the full and simple class name of the specified event and sets the default
- * priority of the event class.
- * @param event an event belonging to the event class to register the class name for etc.
- */
- private void registerEventNames(Event event) {
- if (!HiddenAccess.isCriticalEvent(event)) {
- HiddenAccess.setDefaultPriority(event);
- }
- final Class> type = event.getClass();
- eventNames.put(type.getName(), event); // full name with package name
- eventNames.put(type.getSimpleName(), event); // only the class name
- }
-
- /**
- * A dummy CustomEvent used only for registering the class name.
- */
- @SuppressWarnings("serial")
- private static final class DummyCustomEvent extends CustomEvent {
- public DummyCustomEvent() {
- super(null);
- }
- }
-}
diff --git a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/proxies/HostingRobotProxy.java b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/proxies/HostingRobotProxy.java
deleted file mode 100644
index 9fdb31e..0000000
--- a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/proxies/HostingRobotProxy.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package net.sf.robocode.host.proxies;
-
-
-import net.sf.robocode.host.events.EventManager;
-import net.sf.robocode.host.io.RobotFileSystemManager;
-import net.sf.robocode.host.io.RobotOutputStream;
-import net.sf.robocode.host.security.RobotThreadManager;
-import net.sf.robocode.host.*;
-import static net.sf.robocode.io.Logger.logError;
-import static net.sf.robocode.io.Logger.logMessage;
-import net.sf.robocode.peer.BadBehavior;
-import net.sf.robocode.peer.ExecCommands;
-import net.sf.robocode.peer.IRobotPeer;
-import net.sf.robocode.repository.IRobotItem;
-import net.sf.robocode.core.Container;
-import robocode.RobotStatus;
-import robocode.exception.AbortedException;
-import robocode.exception.DeathException;
-import robocode.exception.DisabledException;
-import robocode.exception.WinException;
-import robocode.robotinterfaces.IBasicRobot;
-import robocode.robotinterfaces.peer.IBasicRobotPeer;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-
-// XXX Remember to update the .NET version whenever a change is made to this class!
-
-/**
- * @author Pavel Savara (original)
- */
-abstract class HostingRobotProxy implements IHostingRobotProxy, IHostedThread {
-
- private final IRobotItem robotSpecification;
-
- protected EventManager eventManager;
- private final IHostManager hostManager;
- protected RobotThreadManager robotThreadManager;
- protected RobotFileSystemManager robotFileSystemManager;
- private IThreadManager threadManager;
-
- private IBasicRobot robot;
- protected final IRobotPeer peer;
- protected IRobotClassLoader robotClassLoader;
-
- protected final RobotStatics statics;
- protected RobotOutputStream out;
-
- private final Set securityViolations = Collections.synchronizedSet(new HashSet());
-
- HostingRobotProxy(IRobotItem robotSpecification, IHostManager hostManager, IRobotPeer peer, RobotStatics statics) {
- this.peer = peer;
- this.statics = statics;
- this.hostManager = hostManager;
- this.robotSpecification = robotSpecification;
-
- robotClassLoader = getHost(robotSpecification).createLoader(robotSpecification);
- robotClassLoader.setRobotProxy(this);
-
- out = new RobotOutputStream();
- robotThreadManager = new RobotThreadManager(this);
-
- loadClassBattle();
-
- robotFileSystemManager = new RobotFileSystemManager(this, hostManager.getRobotFilesystemQuota(),
- robotSpecification.getWritableDirectory(), robotSpecification.getReadableDirectory(),
- robotSpecification.getRootPath());
-
- robotFileSystemManager.initialize();
- }
-
- private JavaHost getHost(IRobotItem robotSpecification) {
- return (JavaHost) Container.cache.getComponent("robocode.host." + robotSpecification.getPlatform().toLowerCase());
- }
-
- public void cleanup() {
- robot = null;
-
- // Remove the file system and the manager
- robotFileSystemManager = null;
- if (out != null) {
- out.close();
- out = null;
- }
-
- if (robotThreadManager != null) {
- robotThreadManager.cleanup();
- }
- robotThreadManager = null;
-
- // Cleanup and remove class manager
- if (robotClassLoader != null) {
- robotClassLoader.cleanup();
- robotClassLoader = null;
- }
- }
-
- public RobotOutputStream getOut() {
- return out;
- }
-
- public void println(String s) {
- out.println(s);
- }
-
- private void println(Throwable ex) {
- ex.printStackTrace(out);
- }
-
- public RobotStatics getStatics() {
- return statics;
- }
-
- public RobotFileSystemManager getRobotFileSystemManager() {
- return robotFileSystemManager;
- }
-
- public ClassLoader getRobotClassloader() {
- return (ClassLoader) robotClassLoader;
- }
-
- // -----------
- // battle driven methods
- // -----------
-
- protected abstract void initializeRound(ExecCommands commands, RobotStatus status);
-
- public void startRound(ExecCommands commands, RobotStatus status) {
- initializeRound(commands, status);
- threadManager = ((HostManager) hostManager).getThreadManager();
- robotThreadManager.start(threadManager);
- }
-
- public void forceStopThread() {
- if (!robotThreadManager.forceStop()) {
- peer.punishBadBehavior(BadBehavior.UNSTOPPABLE);
- peer.setRunning(false);
- }
- }
-
- public void waitForStopThread() {
- if (!robotThreadManager.waitForStop()) {
- peer.punishBadBehavior(BadBehavior.UNSTOPPABLE);
- peer.setRunning(false);
- }
- }
-
- private void loadClassBattle() {
- try {
- robotClassLoader.loadRobotMainClass(true);
- } catch (RuntimeException e) {
- println("SYSTEM: Could not load " + statics.getName() + " : ");
- println(e);
- drainEnergy();
- }
- }
-
- private boolean loadRobotRound() {
- robot = null;
- try {
- threadManager.setLoadingRobot(this);
- robot = robotClassLoader.createRobotInstance();
- if (robot == null) {
- println("SYSTEM: Skipping robot: " + statics.getName());
- return false;
- }
- robot.setOut(out);
- robot.setPeer((IBasicRobotPeer) this);
- eventManager.setRobot(robot);
- } catch (IllegalAccessException e) {
- println("SYSTEM: Unable to instantiate this robot: " + e);
- println("SYSTEM: Is your constructor marked public?");
- println(e);
- robot = null;
- logError(e);
- return false;
- } catch (RuntimeException e) {
- println("SYSTEM: An error occurred during initialization of " + statics.getName());
- println("SYSTEM: " + e);
- println(e);
- robot = null;
- logError(e);
- return false;
- } finally {
- threadManager.setLoadingRobot(null);
- }
- return true;
- }
-
- protected abstract void executeImpl();
-
- public void run() {
- // Only initialize AWT if we are not running in headless mode.
- // Bugfix [2833271] IllegalThreadStateException with the AWT-Shutdown thread.
- // Read more about headless mode here:
- // http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/
- if (System.getProperty("java.awt.headless", "true").equals("false")) {
- robotThreadManager.initAWT();
- }
-
- if (robotSpecification.isValid() && loadRobotRound()) {
- try {
- if (robot != null) {
- peer.setRunning(true);
-
- // Process all events for the first turn.
- // This is done as the first robot status event must occur before the robot
- // has started running.
- eventManager.processEvents();
-
- // Call user code
- callUserCode();
- }
- while (peer.isRunning()) {
- executeImpl();
- }
- } catch (WinException e) {// Do nothing
- } catch (AbortedException e) {// Do nothing
- } catch (DeathException e) {
- println("SYSTEM: " + statics.getName() + " has died");
- } catch (DisabledException e) {
- drainEnergy();
-
- String msg = e.getMessage();
- if (msg == null) {
- msg = "";
- } else {
- msg = ": " + msg;
- }
- println("SYSTEM: Robot disabled: " + msg);
- logMessage("Robot disabled: " + statics.getName());
- } catch (Exception e) {
- drainEnergy();
- println(e);
- logMessage(statics.getName() + ": Exception: " + e); // without stack here
- } catch (ThreadDeath e) {
- drainEnergy();
- println(e);
- logMessage(statics.getName() + " stopped successfully.");
- throw e; // must be re-thrown in order to stop the thread
- } catch (RuntimeException t) {
- drainEnergy();
- println(t);
- logMessage(statics.getName() + ": Throwable: " + t); // without stack here
- } finally {
- waitForBattleEndImpl();
- }
- } else {
- drainEnergy();
- peer.punishBadBehavior(BadBehavior.CANNOT_START);
- waitForBattleEndImpl();
- }
-
- peer.setRunning(false);
-
- // If battle is waiting for us, well, all done!
- synchronized (this) {
- notifyAll();
- }
- }
-
- private void callUserCode() {
- Runnable runnable = robot.getRobotRunnable();
- if (runnable != null) {
- runnable.run();
- }
- }
-
- protected abstract void waitForBattleEndImpl();
-
- public void drainEnergy() {
- peer.drainEnergy();
- }
-
- public void punishSecurityViolation(String message) {
- // Prevent unit tests of failing if multiple threads are calling this method in the same time.
- // We only want the a specific type of security violation logged once so we only get one error
- // per security violation.
- synchronized (securityViolations) {
- String key = message;
-
- if (key.startsWith("Preventing Thread-")) {
- key = key.replaceAll("\\d+", "X");
- }
- if (!securityViolations.contains(key)) {
- securityViolations.add(key);
- logError(message);
- println("SYSTEM: " + message);
-
- if (securityViolations.size() == 1) {
- peer.drainEnergy();
- peer.punishBadBehavior(BadBehavior.SECURITY_VIOLATION);
- }
- }
- }
- }
-}
diff --git a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/security/RobotClassLoader.java b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/security/RobotClassLoader.java
deleted file mode 100644
index 0993839..0000000
--- a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/security/RobotClassLoader.java
+++ /dev/null
@@ -1,424 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package net.sf.robocode.host.security;
-
-
-import net.sf.robocode.core.Container;
-import net.sf.robocode.host.IHostedThread;
-import net.sf.robocode.host.IRobotClassLoader;
-import net.sf.robocode.io.FileUtil;
-import net.sf.robocode.io.Logger;
-import net.sf.robocode.io.RobocodeProperties;
-import net.sf.robocode.io.URLJarCollector;
-import robocode.robotinterfaces.IBasicRobot;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.net.URLConnection;
-import java.nio.ByteBuffer;
-import java.security.*;
-import java.security.cert.Certificate;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-
-/**
- * This class loader is used by robots. It isolates classes which belong to robot and load them locally.
- * General java classes or robocode.api classes are loaded by parent loader and shared with Robocode engine.
- * Attempts to load classes of Robocode engine are blocked.
- *
- * @author Mathew A. Nelson (original)
- * @author Flemming N. Larsen (contributor)
- * @author Matthew Reeder (contributor)
- * @author Robert D. Maupin (contributor)
- * @author Nathaniel Troutman (contributor)
- */
-public class RobotClassLoader extends URLClassLoader implements IRobotClassLoader {
-
- static final String UNTRUSTED_URL = "http://robocode.sf.net/untrusted";
-
- private static final PermissionCollection EMPTY_PERMISSIONS = new Permissions();
-
- private final String fullClassName;
-
- private ClassLoader parent;
- private CodeSource codeSource;
-
- private IHostedThread robotProxy;
- private Class> robotClass;
-
- // Names on classes referenced from the robot class
- private Set referencedClasses = new HashSet();
-
- // Cached names on found system classes
- private Set foundSystemClasses = new HashSet();
-
- // Cached warning messages
- private String[] staticRobotInstanceWarning;
-
- public RobotClassLoader(URL robotClassPath, String robotFullClassName) {
- super(new URL[] { robotClassPath}, Container.systemLoader);
- fullClassName = robotFullClassName;
- parent = getParent();
- try {
- codeSource = new CodeSource(new URL(UNTRUSTED_URL), (Certificate[]) null);
- } catch (MalformedURLException ignored) {}
- }
-
- public void setRobotProxy(Object robotProxy) {
- this.robotProxy = (IHostedThread) robotProxy;
- }
-
- public synchronized void addURL(URL url) {
- super.addURL(url);
- }
-
- public synchronized Class> loadClass(String name, boolean resolve) throws ClassNotFoundException {
- if (name.startsWith("java.lang")) {
- // we always delegate java.lang stuff to parent loader
- return super.loadClass(name, resolve);
- }
- if (RobocodeProperties.isSecurityOn()) {
- testPackages(name);
- }
- if (!name.startsWith("robocode")) {
- Class> result = loadRobotClassLocaly(name, resolve);
- if (result != null) {
- // yes, it is in robot's class path
- // we loaded it locally
- return result;
- }
- }
-
- // it is robot API
- // or java class
- // or security is off
- // so we delegate to parent class loader
- return parent.loadClass(name);
- }
-
- private void testPackages(String name) throws ClassNotFoundException {
- if (name.startsWith("net.sf.robocode")) {
- String message = "Robots are not allowed to reference Robocode engine in package: net.sf.robocode";
-
- punishSecurityViolation(message);
- throw new ClassNotFoundException(message);
- }
- if (name.startsWith("robocode.control")) {
- String message = "Robots are not allowed to reference Robocode engine in package: robocode.control";
-
- punishSecurityViolation(message);
- throw new ClassNotFoundException(message);
- }
- if (RobocodeProperties.isSecurityOn() && name.startsWith("javax.swing")) {
- String message = "Robots are not allowed to reference Robocode engine in package: javax.swing";
-
- punishSecurityViolation(message);
- throw new ClassNotFoundException(message);
- }
- }
-
- private Class> loadRobotClassLocaly(String name, boolean resolve) throws ClassNotFoundException {
- Class> result = findLoadedClass(name);
- if (result == null) {
- ByteBuffer resource = findLocalResource(name);
- if (resource != null) {
- result = defineClass(name, resource, codeSource);
- if (resolve) {
- resolveClass(result);
- }
- ClassAnalyzer.getReferencedClasses(resource, referencedClasses);
- }
- }
- return result;
- }
-
- // this whole fun is there to be able to provide defineClass with bytes
- // we need to call defineClass to be able to set codeSource to untrustedLocation
- private ByteBuffer findLocalResource(final String name) {
- return AccessController.doPrivileged(new PrivilegedAction() {
- public ByteBuffer run() {
- // try to find it in robot's class path
- // this is URL, don't change to File.pathSeparator
- String path = name.replace('.', '/').concat(".class");
- URL url = findResource(path);
- ByteBuffer result = null;
- InputStream is = null;
- BufferedInputStream bis = null;
-
- if (url != null) {
- try {
- URLConnection connection = URLJarCollector.openConnection(url);
-
- is = connection.getInputStream();
- bis = new BufferedInputStream(is);
-
- result = ByteBuffer.allocate(1024 * 8);
- boolean done = false;
-
- do {
- do {
- int res = bis.read(result.array(), result.position(), result.remaining());
-
- if (res == -1) {
- done = true;
- break;
- }
- result.position(result.position() + res);
- } while (result.remaining() != 0);
- result.flip();
- if (!done) {
- result = ByteBuffer.allocate(result.capacity() * 2).put(result);
- }
- } while (!done);
-
- } catch (IOException e) {
- Logger.logError(e);
- return null;
- } finally {
- FileUtil.cleanupStream(bis);
- FileUtil.cleanupStream(is);
- }
- }
- return result;
- }
- });
- }
-
- private void punishSecurityViolation(String message) {
- if (robotProxy != null) {
- robotProxy.punishSecurityViolation(message);
- }
- }
-
- protected PermissionCollection getPermissions(CodeSource codesource) {
- if (RobocodeProperties.isSecurityOn()) {
- return EMPTY_PERMISSIONS;
- }
- return super.getPermissions(codesource);
- }
-
- public String[] getReferencedClasses() {
- return referencedClasses.toArray(new String[referencedClasses.size()]);
- }
-
- public synchronized Class> loadRobotMainClass(boolean resolve) throws ClassNotFoundException {
- try {
- if (robotClass == null) {
- robotClass = loadClass(fullClassName, resolve);
-
- if (!IBasicRobot.class.isAssignableFrom(robotClass)) {
- // that's not robot
- return null;
- }
- if (resolve) {
- // resolve methods to see more referenced classes
- robotClass.getMethods();
-
- // iterate thru dependencies until we didn't found any new
- HashSet clone;
-
- do {
- clone = new HashSet(referencedClasses);
- for (String reference : clone) {
- testPackages(reference);
- if (!isSystemClass(reference)) {
- loadClass(reference, true);
- }
- }
- } while (referencedClasses.size() != clone.size());
- }
- } else {
- warnIfStaticRobotInstanceFields();
- }
- } catch (RuntimeException e) {
- robotClass = null;
- throw new ClassNotFoundException(e.getMessage(), e);
- }
- return robotClass;
- }
-
- public IBasicRobot createRobotInstance() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
- loadRobotMainClass(true);
- return (IBasicRobot) robotClass.newInstance();
- }
-
- public void cleanup() {
- // Bug fix [2930266] - Robot static data isn't being GCed after battle
- for (String className : getReferencedClasses()) {
- cleanStaticReferences(className);
- }
-
- parent = null;
- codeSource = null;
- robotProxy = null;
- robotClass = null;
- referencedClasses = null;
- foundSystemClasses = null;
- }
-
- /**
- * Cleans all static field references on a class.
- *
- * @param className the name of the class containing the static references to clean.
- */
- private void cleanStaticReferences(String className) {
- if (isSystemClass(className)) {
- return;
- }
- Class> type = null;
- try {
- type = loadRobotClassLocaly(className, false);
- if (type != null) {
- for (Field field : getAllFields(new ArrayList(), type)) {
- if (isStaticReference(field)) {
- cleanStaticReference(field);
- }
- }
- }
- } catch (RuntimeException t) {
- Logger.logError(t);
- }
- }
-
- private void warnIfStaticRobotInstanceFields() {
- if (staticRobotInstanceWarning == null) {
- List staticRobotReferences = new ArrayList();
-
- for (String className : getReferencedClasses()) { // Bug fix [3028102] - ConcurrentModificationException
- if (isSystemClass(className)) {
- continue;
- }
- Class> type = null;
- try {
- type = loadRobotClassLocaly(className, false);
- } catch (RuntimeException t) {
- continue;
- }
- if (type != null) {
- for (Field field : getAllFields(new ArrayList(), type)) {
- if (isStaticReference(field) && IBasicRobot.class.isAssignableFrom(field.getType())
- && field.getAnnotation(robocode.annotation.SafeStatic.class) == null) {
- staticRobotReferences.add(field);
- }
- }
- }
- }
- if (staticRobotReferences.size() > 0) {
- StringBuilder buf = new StringBuilder();
-
- buf.append("Warning: ").append(fullClassName).append(
- " uses static reference to a robot with the following field(s):");
-
- for (Field field : staticRobotReferences) {
- buf.append("\n\t").append(field.getDeclaringClass().getName()).append('.').append(field.getName()).append(", which points to a ").append(
- field.getType().getName());
- }
-
- staticRobotInstanceWarning = new String[] {
- buf.toString(),
- "Static references to robots can cause unwanted behaviour with the robot using these.",
- "Please change static robot references to non-static references and recompile the robot."};
- } else {
- staticRobotInstanceWarning = new String[] {}; // Signal that there is no warnings to cache
- }
- } else if (staticRobotInstanceWarning.length == 0) {
- return; // Return, as no warnings should be written out in the robot console
- }
-
- // Write out warnings to the robot console
- if (robotProxy != null) {
- for (String line : staticRobotInstanceWarning) {
- robotProxy.getOut().println("SYSTEM: " + line);
- }
- }
- }
-
- /**
- * Cleans a static field reference class, even when it is 'private static final'
- *
- * @param field the field to clean, if it is a static reference.
- */
- private void cleanStaticReference(Field field) {
- if (field.getName().startsWith("const__")) {
- // Ignore 'const__' fields used with e.g. the Clojure language
- return;
- }
- field.setAccessible(true);
- try {
- // In order to set a 'private static field', we need to fix the modifier, i.e. use magic! ;-)
- Field modifiersField = Field.class.getDeclaredField("modifiers");
- modifiersField.setAccessible(true);
- int modifiers = modifiersField.getInt(field);
- modifiersField.setInt(field, modifiers & ~Modifier.FINAL); // Remove the FINAL modifier
- field.set(null, null);
-
- } catch (RuntimeException ignore) {}
- }
-
- /**
- * Gets all fields of a class (public, protected, private) and the ones inherited from all super classes.
- * @param fields the list where the fields will be added as a result of calling this method.
- * @param type the class to retrieve all the fields from
- * @return the list specified as input parameter containing all the retrieved fields
- */
- private List getAllFields(List fields, Class> type) {
- if (type == null || isSystemClass(type.getName())) {
- return fields;
- }
- try {
- for (Field field: type.getDeclaredFields()) {
- fields.add(field);
- }
- } catch (RuntimeException ignore) {// NoClassDefFoundError does occur with some robots, e.g. sgp.Drunken [1.12]
- // We ignore all exceptions and errors here so we can proceed to retrieve
- // field from super classes.
- }
- if (type.getSuperclass() != null) {
- fields = getAllFields(fields, type.getSuperclass());
- }
- return fields;
- }
-
- /**
- * Checks if a specified class name is a Java system class or internal Robocode class.
- * @param className the class name to check.
- * @return true if the class name is a system class; false otherwise.
- */
- private boolean isSystemClass(String className) {
- boolean isSystemClass = foundSystemClasses.contains(className);
- if (!isSystemClass) {
- try {
- if (findSystemClass(className) != null) {
- foundSystemClasses.add(className);
- isSystemClass = true;
- }
- } catch (ClassNotFoundException ignore) {}
- }
- return isSystemClass;
- }
-
- /**
- * Checks if a specified field is a static reference.
- *
- * @param field the field to check.
- * @return true if the field is static reference; false otherwise.
- */
- private static boolean isStaticReference(Field field) {
- return Modifier.isStatic(field.getModifiers())
- && !(field.getType().isPrimitive() || field.isEnumConstant() || field.isSynthetic());
- }
-}
diff --git a/workspace_robo4/robocode.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java b/workspace_robo4/robocode.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java
deleted file mode 100644
index e4c6d0a..0000000
--- a/workspace_robo4/robocode.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java
+++ /dev/null
@@ -1,705 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package net.sf.robocode.installer;
-
-
-import javax.swing.*;
-
-import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.*;
-import java.net.URL;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.jar.JarInputStream;
-
-
-/**
- * Installer for Robocode.
- *
- * @author Mathew A. Nelsen (original)
- * @author Flemming N. Larsen (contributor)
- */
-public class AutoExtract implements ActionListener {
- private JDialog licenseDialog;
- private boolean accepted;
- private static final String[] SPINNER = { "-", "\\", "|", "/"};
- private String message = "";
- private static File installDir;
- private static final String osName = System.getProperty("os.name");
- private static final double osVersion = doubleValue(System.getProperty("os.version"));
- private static final String javaVersion = System.getProperty("java.version");
-
- private static double doubleValue(String s) {
- s = s.replaceAll("[^.0-9]", ""); // Remove invalid characters, e.g. "3.0-ARCH" become "3.0"
-
- int p = s.indexOf(".");
-
- if (p >= 0) {
- p = s.indexOf(".", p + 1);
- }
- if (p >= 0) {
- s = s.substring(0, p);
- }
-
- double d = 0.0;
-
- try {
- d = Double.parseDouble(s);
- } catch (NumberFormatException e) {
- e.printStackTrace(System.err);
- }
-
- return d;
- }
-
- private boolean acceptLicense() {
- StringBuffer licenseText = new StringBuffer();
-
- InputStream is;
-
- try {
- JarFile extractJar = new JarFile("extract.jar");
-
- is = extractJar.getInputStream(extractJar.getJarEntry("license/cpl-v10.html"));
- } catch (IOException e) {
- return true;
- }
- if (is == null) {
- return true;
- }
-
- InputStreamReader isr = null;
- BufferedReader br = null;
-
- try {
- isr = new InputStreamReader(is);
- br = new BufferedReader(isr);
-
- String line = br.readLine();
-
- while (line != null) {
- licenseText.append(line);
- line = br.readLine();
- }
- return acceptReject(licenseText.toString());
-
- } catch (IOException e) {
- System.err.println("Could not read line from license file: " + e);
- } finally {
- if (br != null) {
- try {
- br.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- if (isr != null) {
- try {
- isr.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- return true;
- }
-
- private boolean acceptReject(String text) {
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-
- licenseDialog = new JDialog();
- licenseDialog.setTitle("License Agreement");
- licenseDialog.setModal(true);
- licenseDialog.setLocation((screenSize.width - 500) / 2, (screenSize.height - 400) / 2);
- licenseDialog.setSize(500, 400);
- JTextPane t = new JTextPane();
-
- t.setContentType("text/html");
- t.setText(text);
- t.setFont(new Font("Dialog", Font.PLAIN, 12));
- t.setEditable(false);
-
- JScrollPane s = new JScrollPane();
-
- s.setViewportView(t);
-
- licenseDialog.getContentPane().setLayout(new BorderLayout());
- licenseDialog.getContentPane().add(s, BorderLayout.CENTER);
-
- JPanel p = new JPanel();
-
- p.setLayout(new BorderLayout());
- JButton b1 = new JButton("Accept");
- JButton b2 = new JButton("Cancel");
-
- p.add(b1, BorderLayout.WEST);
- p.add(b2, BorderLayout.EAST);
-
- b1.addActionListener(this);
- b2.addActionListener(this);
-
- licenseDialog.getContentPane().add(p, BorderLayout.SOUTH);
-
- licenseDialog.setVisible(true);
-
- return accepted;
- }
-
- public void actionPerformed(ActionEvent e) {
- accepted = e.getActionCommand().equals("Accept");
- licenseDialog.dispose();
- licenseDialog = null;
- }
-
- private boolean extract(File installDir) {
- JDialog statusDialog = new JDialog();
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-
- int width = 500;
- int height = 100;
-
- statusDialog.setTitle("Installing");
- statusDialog.setLocation((screenSize.width - width) / 2, (screenSize.height - height) / 2);
- statusDialog.setSize(width, height);
- JLabel status = new JLabel();
-
- statusDialog.getContentPane().setLayout(new BorderLayout());
- statusDialog.getContentPane().add(status, BorderLayout.CENTER);
-
- statusDialog.setVisible(true);
-
- FileOutputStream fos;
- String entryName;
-
- byte buf[] = new byte[2048];
-
- final String name = AutoExtract.class.getName().replaceAll("\\.", "/") + ".class";
- String urlJar = AutoExtract.class.getClassLoader().getResource(name).toString();
- final String src = urlJar.substring("jar:file:/".length(), urlJar.indexOf("!/"));
-
- if (src.indexOf('!') > -1) {
- message = src + "\nContains an exclamation point. Please move the file to a different directory.";
- JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE);
- return false;
- }
- JarInputStream jarIS = null;
-
- try {
- final URL url = new URL("file:/" + src);
- InputStream is = url.openStream();
-
- jarIS = new JarInputStream(is);
-
- JarEntry entry;
-
- while ((entry = jarIS.getNextJarEntry()) != null) {
- int spin = 0;
-
- entryName = entry.getName();
- if (entry.isDirectory()) {
- if (!entryName.startsWith("net") && !(entryName.equals("desktop") && isFreeBSD())) {
- File dir = new File(installDir, entry.getName());
- if (!dir.exists() && !dir.mkdirs()) {
- System.err.println("Can't create dir: " + dir);
- }
- }
- } else if (!entryName.equals(name)) {
-
- // Skip .bat, .sh, and .command files depending on which OS Robocode is installed
-
- final String entryNameLC = entryName.toLowerCase();
-
- boolean skipEntry = false;
-
- final boolean isBatFile = entryNameLC.length() > ".bat".length() && entryNameLC.endsWith(".bat");
- final boolean isShFile = entryNameLC.length() > ".sh".length() && entryNameLC.endsWith(".sh");
- final boolean isCommandFile = entryNameLC.length() > ".command".length()
- && entryNameLC.endsWith(".command");
- final boolean isDesktopFile = entryNameLC.startsWith("desktop/");
-
- // Unix systems and Mac OS X
- if (File.separatorChar == '/') {
- // Skip .bat files under Unix and Mac OS X
- // Skip .command files under Unix
- skipEntry = isBatFile || (isCommandFile && !isMacOSX()) || (isDesktopFile && !isFreeBSD());
- } else {
- // Under Windows the .sh and .command files are skipped
- skipEntry = isShFile || isCommandFile || isDesktopFile;
- }
-
- // If we are not skipping the entry, then copy from our .jar into the installation dir
- if (!skipEntry) {
- status.setText(entryName + " " + SPINNER[spin++]);
-
- File out = new File(installDir, entryName);
-
- File parentDirectory = new File(out.getParent());
- if (!parentDirectory.exists() && !parentDirectory.mkdirs()) {
- System.err.println("Can't create dir: " + parentDirectory);
- }
- fos = new FileOutputStream(out);
-
- int index = 0;
- int num;
- int count = 0;
-
- while ((num = jarIS.read(buf, 0, 2048)) != -1) {
- fos.write(buf, 0, num);
- index += num;
- count++;
- if (count > 80) {
- status.setText(entryName + " " + SPINNER[spin++] + " (" + index + " bytes)");
- if (spin > 3) {
- spin = 0;
- }
- count = 0;
- }
- }
- fos.close();
-
- // Set file permissions for .sh and .command files under Unix and Mac OS X
- if (File.separatorChar == '/') {
- if (isShFile || isCommandFile) {
- // Grant read and execute access for everyone and also write access for the owner of the file
- Runtime.getRuntime().exec("chmod 755 " + out.toString());
- }
- }
-
- status.setText(entryName + " " + SPINNER[spin] + " (" + index + " bytes)");
- }
- }
- }
- statusDialog.dispose();
- return true;
- } catch (IOException e) {
- message = "Installation failed: " + e;
- JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE);
- return false;
- } finally {
- if (jarIS != null) {
- try {
- jarIS.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- public static void main(String argv[]) {
- String suggestedDirName;
-
- if (argv.length == 1) {
- suggestedDirName = argv[0];
- } else if (isWindowsOS()) {
- suggestedDirName = "C:\\robocode\\";
- } else {
- suggestedDirName = System.getProperty("user.home") + File.separator + "robocode" + File.separator;
- }
-
- String message;
-
- if (install(new File(suggestedDirName))) {
- message = "Installation successful";
- } else {
- message = "Installation cancelled";
- }
-
- // Delete the class file with the installer and it's parent folders in the robocode home dir
- if (installDir != null) {
- String installerPath = AutoExtract.class.getName().replaceAll("\\.", "/") + "$1.class";
-
- deleteFileAndParentDirsIfEmpty(new File(installDir, installerPath));
- }
-
- JOptionPane.showMessageDialog(null, message);
- }
-
- private static boolean install(File suggestedDir) {
- // Verify that the Java version is version 6 (1.6.0) or newer
- if (javaVersion.startsWith("1.") && javaVersion.charAt(2) < '5') {
- final String message = "Robocode requires Java 6 (1.6.0) or newer.\n"
- + "Your system is currently running Java " + javaVersion + ".\n"
- + "If you have not installed (or activated) at least\n" + "JRE 6 or JDK 6, please do so.";
-
- JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE);
- System.err.println(message);
- return false;
- }
-
- // Set native look and feel
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (RuntimeException t) {// For some reason Ubuntu 7 can cause a NullPointerException when trying to getting the LAF
- }
-
- AutoExtract extractor = new AutoExtract();
-
- if (extractor.acceptLicense()) {
- boolean done = false;
-
- while (!done) {
- int rc = JOptionPane.showConfirmDialog(null,
- "Robocode will be installed in:\n" + suggestedDir + "\nIs this ok?", "Installing Robocode",
- JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
-
- if (rc == JOptionPane.YES_OPTION) {
- installDir = suggestedDir;
- done = true;
- } else if (rc == JOptionPane.NO_OPTION) {
- Object r = JOptionPane.showInputDialog(null, "Please type in the installation directory",
- "Installation Directory", JOptionPane.PLAIN_MESSAGE, null, null, suggestedDir);
-
- if (r != null) {
- suggestedDir = new File(((String) r).trim());
- } else {
- return false;
- }
- } else if (rc == JOptionPane.CANCEL_OPTION) {
- return false;
- }
- }
- if (!installDir.exists() && !installDir.mkdirs()) {
- System.err.println("Can't create dir: " + installDir);
- return false;
- }
- deleteOldLibs(installDir);
-
- // The .robotcache has been renamed to .data
- File robotsCacheDir = new File(installDir, "robots/.robotcache");
- File robotsDataDir = new File(installDir, "robots/.data");
-
- if (robotsCacheDir.exists()) {
- // Rename ".robotcache" into ".data"
- robotsCacheDir.renameTo(robotsDataDir);
- }
-
- // Fix problem with .data starting with a underscore dir by
- // renaming files containing ".data/_" into ".data"
- if (robotsDataDir.exists()) {
- File underScoreDir = new File(robotsDataDir, "_");
- String[] list = underScoreDir.list();
-
- if (list != null) {
- for (String fileName : list) {
- File file = new File(underScoreDir, fileName);
-
- file.renameTo(new File(robotsDataDir, fileName));
- }
- underScoreDir.delete();
- }
- }
-
- // Create shortcuts and file associations
- if (extractor.extract(installDir)) {
- extractor.createShortcuts(installDir, "robocode.bat", "Robocode", "Robocode");
- extractor.createFileAssociations(installDir);
- return true;
- }
- }
- return false;
- }
-
- private static void deleteOldLibs(File installDir) {
- File libs = new File(installDir, "libs");
-
- if (libs.exists()) {
- final File[] del = libs.listFiles(new FilenameFilter() {
-
- public boolean accept(File dir, String name) {
- String test = name.toLowerCase();
-
- return test.endsWith(".jar") || test.endsWith(".dll");
- }
- });
-
- for (File d : del) {
- if (!d.delete()) {
- System.err.println("Can't delete: " + d);
- }
- }
- }
- }
-
- private static boolean deleteDir(File dir) {
- if (dir.isDirectory()) {
- for (File file : dir.listFiles()) {
- if (file.isDirectory()) {
- // Skip directories ending with ".data"
- if (file.getName().endsWith(".data")) {
- continue;
- }
- try {
- // Test for symlink and ignore.
- // Robocode won't create one, but just in case a user does...
- if (file.getCanonicalFile().getParentFile().equals(dir.getCanonicalFile())) {
- deleteDir(file);
- if (file.exists() && !file.delete()) {
- System.err.println("Can't delete: " + file);
- }
- } else {
- System.out.println("Warning: " + file + " may be a symlink. It has been ignored");
- }
- } catch (IOException e) {
- System.out.println(
- "Warning: Cannot determine canonical file for " + file + ". It has been ignored");
- }
- } else {
- if (file.exists() && !file.delete()) {
- System.err.println("Can't delete: " + file);
- }
- }
- }
- return dir.delete();
- }
- return false;
- }
-
- private void createShortcuts(File installDir, String runnable, String folder, String name) {
- if (osName.toLowerCase().indexOf("win") == 0) {
- if (createWindowsShortcuts(installDir, runnable, folder, name) == false) {
- JOptionPane.showMessageDialog(null,
- message + "\n" + "To start Robocode, enter the following at a command prompt:\n" + "cd "
- + installDir.getAbsolutePath() + "\n" + "robocode.bat");
- }
- } else if (osName.toLowerCase().indexOf("mac") == 0) {
- if (osVersion >= 10.1) {
- JOptionPane.showMessageDialog(null,
- message + "\n" + "To start Robocode, browse to " + installDir + " then double-click robocode.sh\n");
- } else {
- JOptionPane.showMessageDialog(null,
- message + "\n" + "To start Robocode, enter the following at a command prompt:\n"
- + installDir.getAbsolutePath() + "/robocode.sh");
- }
- } else {
- JOptionPane.showMessageDialog(null,
- message + "\n" + "To start Robocode, enter the following at a command prompt:\n"
- + installDir.getAbsolutePath() + "/robocode.sh");
- }
- }
-
- private boolean createWindowsShortcuts(File installDir, String runnable, String folder, String name) {
- int rc = JOptionPane.showConfirmDialog(null,
- "Would you like to install a shortcut to Robocode in the Start menu? (Recommended)", "Create Shortcuts",
- JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
-
- if (rc != JOptionPane.YES_OPTION) {
- return false;
- }
-
- final String command = getWindowsCmd() + " cscript.exe ";
-
- try {
- File shortcutMaker = new File(installDir, "makeshortcut.vbs");
- PrintStream out = new PrintStream(new FileOutputStream(shortcutMaker));
-
- out.println("WScript.Echo(\"Creating shortcuts...\")");
- out.println("Set Shell = CreateObject (\"WScript.Shell\")");
- out.println("Set fso = CreateObject(\"Scripting.FileSystemObject\")");
- out.println("ProgramsPath = Shell.SpecialFolders(\"Programs\")");
- out.println("if (not(fso.folderExists(ProgramsPath + \"\\\\" + folder + "\"))) Then");
- out.println(" fso.CreateFolder(ProgramsPath + \"\\\\" + folder + "\")");
- out.println("End If");
- out.println("Set link = Shell.CreateShortcut(ProgramsPath + \"\\\\" + folder + "\\\\" + name + ".lnk\")");
- out.println("link.Arguments = \"\"");
- out.println("link.Description = \"" + name + "\"");
- out.println("link.HotKey = \"\"");
- out.println("link.IconLocation = \"" + escaped(installDir.getAbsolutePath()) + "\\\\" + "robocode.ico,0\"");
- out.println("link.TargetPath = \"" + escaped(installDir.getAbsolutePath()) + "\\\\" + runnable + "\"");
- out.println("link.WindowStyle = 1");
- out.println("link.WorkingDirectory = \"" + escaped(installDir.getAbsolutePath()) + "\"");
- out.println("link.Save()");
- out.println("DesktopPath = Shell.SpecialFolders(\"Desktop\")");
- out.println("Set link = Shell.CreateShortcut(DesktopPath + \"\\\\" + name + ".lnk\")");
- out.println("link.Arguments = \"\"");
- out.println("link.Description = \"" + name + "\"");
- out.println("link.HotKey = \"\"");
- out.println("link.IconLocation = \"" + escaped(installDir.getAbsolutePath()) + "\\\\" + "robocode.ico,0\"");
- out.println("link.TargetPath = \"" + escaped(installDir.getAbsolutePath()) + "\\\\" + runnable + "\"");
- out.println("link.WindowStyle = 1");
- out.println("link.WorkingDirectory = \"" + escaped(installDir.getAbsolutePath()) + "\"");
- out.println("link.Save()");
- out.println("WScript.Echo(\"Shortcuts created.\")");
-
- out.close();
-
- Process p = Runtime.getRuntime().exec(command + " makeshortcut.vbs", null, installDir);
- int rv = p.waitFor();
-
- if (rv != 0) {
- System.err.println("Can't create shortcut: " + shortcutMaker);
- return false;
- }
- JOptionPane.showMessageDialog(null,
- message + "\n" + "A Robocode program group has been added to your Start menu\n"
- + "A Robocode icon has been added to your desktop.");
- if (!shortcutMaker.delete()) {
- System.err.println("Can't delete: " + shortcutMaker);
- }
- return true;
- } catch (IOException e) {
- e.printStackTrace(System.err);
- } catch (InterruptedException e) {
- e.printStackTrace(System.err);
- }
-
- return false;
- }
-
- private void createFileAssociations(File installDir) {
- if (isWindowsOS()) {
- createWindowsFileAssociations(installDir);
- }
- }
-
- private void createWindowsFileAssociations(File installDir) {
- int rc = JOptionPane.showConfirmDialog(null,
- "Would you like to create file associations for Robocode in\n"
- + "the Windows Registry for the file extensions .battle and .br?\n"
- + "Please notice that you might need to grant permission to add\n"
- + "the file associations in the Registry, and you must be an\n"
- + "administrator or granted permission to change the registry.",
- "Create File Associations",
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
-
- if (rc != JOptionPane.YES_OPTION) {
- return;
- }
-
- File file = null;
- PrintStream out = null;
-
- try {
- file = new File(installDir + "\\FileAssoc.reg");
-
- out = new PrintStream(new FileOutputStream(file));
-
- String installPath = installDir.getAbsolutePath();
-
- out.print(
- createWindowsRegistryFileAssociation(installPath, ".battle", "Robocode.BattleSpecification",
- "Robocode Battle Specification", "-battle"));
- out.print(
- createWindowsRegistryFileAssociation(installPath, ".br", "Robocode.BattleRecord", "Robocode Battle Record",
- "-replay"));
-
- out.close();
- out = null;
-
- Process p = Runtime.getRuntime().exec(getWindowsCmd() + file.getAbsolutePath(), null, null);
- int rv;
-
- try {
- rv = p.waitFor();
- if (rv != 0) {
- System.err.println("Could not create association(s)");
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- if (out != null) {
- out.close();
- }
- if (file != null) {
- if (!file.delete()) {
- System.err.println("Could not delete the file: " + file);
- }
- }
- }
- }
-
- private static String createWindowsRegistryFileAssociation(String installDir, String fileExt, String progId, String description, String robocodeCmdParam) {
- StringBuffer sb = new StringBuffer();
-
- final String HKCR = "[HKEY_CLASSES_ROOT\\";
-
- sb.append("REGEDIT4\n");
- sb.append(HKCR).append(fileExt).append("]\n");
- sb.append("@=\"").append(progId).append("\"\n");
- sb.append(HKCR).append(progId).append("]\n");
- sb.append("@=\"").append(description).append("\"\n");
- sb.append(HKCR).append(progId).append("\\shell]\n");
- sb.append(HKCR).append(progId).append("\\shell\\open]\n");
- sb.append(HKCR).append(progId).append("\\shell\\open\\command]\n");
- sb.append("@=\"").append(getWindowsCmd()).append("\\\"cd \\\"").append(installDir.replaceAll("[\\\\]", "\\\\\\\\")).append("\\\" && robocode.bat ").append(robocodeCmdParam).append(
- " \\\"%1\\\"\\\"\"\n");
-
- return sb.toString();
- }
-
- private static String escaped(String s) {
- StringBuffer eascaped = new StringBuffer();
-
- for (int i = 0; i < s.length(); i++) {
- if (s.charAt(i) == '\\') {
- eascaped.append('\\');
- }
- eascaped.append(s.charAt(i));
- }
- return eascaped.toString();
- }
-
- private static boolean isWindowsOS() {
- return osName.startsWith("Windows ");
- }
-
- private static boolean isMacOSX() {
- return osName.startsWith("Mac OS X");
- }
-
- private static boolean isFreeBSD() {
- return osName.equals("FreeBSD");
- }
-
- private static String getWindowsCmd() {
- String os = System.getProperty("os.name");
-
- return ((os.equals("Windows 95") || os.equals("Windows 95") || os.equals("Windows ME"))
- ? "command.com"
- : "cmd.exe")
- + " /C ";
- }
-
- /**
- * Deletes a file and afterwards deletes the parent directories that are empty.
- *
- * @param file the file or directory to delete
- * @return true if success
- */
- private static boolean deleteFileAndParentDirsIfEmpty(final File file) {
- boolean wasDeleted = false;
-
- if (file != null && file.exists()) {
- if (file.isDirectory()) {
- wasDeleted = deleteDir(file);
- } else {
- wasDeleted = file.delete();
-
- File parent = file;
-
- while (wasDeleted && (parent = parent.getParentFile()) != null) {
- // Delete parent directory, but only if it is empty
- File[] files = parent.listFiles();
-
- if (files != null && files.length == 0) {
- wasDeleted = deleteDir(parent);
- } else {
- wasDeleted = false;
- }
- }
- }
- }
- return wasDeleted;
- }
-}
diff --git a/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/FileTransfer.java b/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/FileTransfer.java
deleted file mode 100644
index 09004c4..0000000
--- a/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/FileTransfer.java
+++ /dev/null
@@ -1,657 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package net.sf.robocode.roborumble.netengine;
-
-
-import java.io.*;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Properties;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.InflaterInputStream;
-
-import static net.sf.robocode.roborumble.util.PropertiesUtil.getProperties;
-
-
-/**
- * Utility class for downloading files from the net and copying files.
- *
- * @author Flemming N. Larsen (original)
- */
-public class FileTransfer {
-
- private final static int DEFAULT_CONNECTION_TIMEOUT = 10000; // 10 seconds
- private final static int DEFAULT_READ_TIMEOUT = 10000; // 10 seconds
- private final static int DEFAULT_SESSION_TIMEOUT = 10000; // 10 seconds
-
- private static int connectionTimeout = DEFAULT_CONNECTION_TIMEOUT;
- private static int readTimeout = DEFAULT_READ_TIMEOUT;
- private static int sessionTimeout = DEFAULT_SESSION_TIMEOUT;
-
- static {
- readProperties();
- }
-
- /**
- * Represents the download status returned when downloading files.
- */
- public enum DownloadStatus {
- OK, // The download was succesful
- COULD_NOT_CONNECT, // Connection problem
- FILE_NOT_FOUND, // The file to download was not found
- }
-
-
- /**
- * Daemon worker thread containing a 'finish' flag for waiting and notifying when the thread has finished it's job.
- */
- private static class WorkerThread extends Thread {
-
- final Object monitor = new Object();
-
- volatile boolean isFinished;
-
- public WorkerThread(String name) {
- super(name);
- setDaemon(true);
- }
-
- void notifyFinish() {
- // Notify that this thread is finish
- synchronized (monitor) {
- isFinished = true;
- monitor.notifyAll();
- }
- }
- }
-
- /*
- * Returns a session id for keeping a session on a HTTP site.
- *
- * @param url is the url of the HTTP site.
- *
- * @return a session id for keeping a session on a HTTP site or null if no session is available.
- */
- public static String getSessionId(String url) {
- HttpURLConnection conn = null;
-
- try {
- // Open connection
- conn = FileTransfer.connectToHttpInputConnection(new URL(url));
- if (conn == null) {
- throw new IOException("Could not open connection to '" + url + "'");
- }
-
- // Get a session id if available
- final GetSessionIdThread sessionIdThread = new GetSessionIdThread(conn);
-
- sessionIdThread.start();
-
- // Wait for the session id
- synchronized (sessionIdThread.monitor) {
- while (!sessionIdThread.isFinished) {
- try {
- sessionIdThread.monitor.wait(sessionTimeout);
- sessionIdThread.interrupt();
- } catch (InterruptedException e) {
- // Immediately reasserts the exception by interrupting the caller thread itself
- Thread.currentThread().interrupt();
-
- return null;
- }
- }
- }
-
- // Return the session id
- return sessionIdThread.sessionId;
-
- } catch (final IOException e) {
- return null;
- } finally {
- // Make sure the connection is disconnected.
- // This will cause threads using the connection to throw an exception
- // and thereby terminate if they were hanging.
- if (conn != null) {
- conn.disconnect();
- }
- }
- }
-
- /**
- * Worker thread used for getting the session id of an already open HTTP connection.
- */
- private final static class GetSessionIdThread extends WorkerThread {
-
- // The resulting session id to read out
- String sessionId;
-
- final HttpURLConnection conn;
-
- GetSessionIdThread(HttpURLConnection conn) {
- super("FileTransfer: Get session ID");
- this.conn = conn;
- }
-
- @Override
- public void run() {
- try {
- // Get the cookie value
- final String cookieVal = conn.getHeaderField("Set-Cookie");
-
- // Extract the session id from the cookie value
- if (cookieVal != null) {
- sessionId = cookieVal.substring(0, cookieVal.indexOf(";"));
- }
- } catch (final Exception e) {
- sessionId = null;
- }
- // Notify that this thread is finish
- notifyFinish();
- }
- }
-
- /**
- * Downloads a file from a HTTP site.
- *
- * @param url is the url of the HTTP site to download the file from.
- * @param filename is the filename of the destination file.
- * @param sessionId is an optional session id if the download is session based.
- * @return the download status, which is DownloadStatus.OK if the download completed successfully; otherwise an
- * error occurred.
- */
- public static DownloadStatus download(String url, String filename, String sessionId) {
- HttpURLConnection conn = null;
-
- try {
- // Create connection
- conn = connectToHttpInputConnection(new URL(url), sessionId);
- if (conn == null) {
- throw new IOException("Could not open connection to: " + url);
- }
-
- // Begin the download
- final DownloadThread downloadThread = new DownloadThread(conn, filename);
-
- downloadThread.start();
-
- // Wait for the download to complete
- synchronized (downloadThread.monitor) {
- while (!downloadThread.isFinished) {
- try {
- downloadThread.monitor.wait();
- } catch (InterruptedException e) {
- return DownloadStatus.COULD_NOT_CONNECT;
- }
- }
- }
-
- // Return the download status
- return downloadThread.status;
-
- } catch (final IOException e) {
- return DownloadStatus.COULD_NOT_CONNECT;
- } finally {
- // Make sure the connection is disconnected.
- // This will cause threads using the connection to throw an exception
- // and thereby terminate if they were hanging.
- try {
- if (conn != null) {
- conn.disconnect();
- }
- } catch (RuntimeException ignore) {// we expect this, right ?
- }
- }
- }
-
- /**
- * Worker thread used for downloading a file from an already open HTTP connection.
- */
- private final static class DownloadThread extends WorkerThread {
-
- // The download status to be read out
- DownloadStatus status = DownloadStatus.COULD_NOT_CONNECT; // Default error
-
- final HttpURLConnection conn;
- final String filename;
-
- InputStream in;
- OutputStream out;
-
- DownloadThread(HttpURLConnection conn, String filename) {
- super("FileTransfer: Download");
- this.conn = conn;
- this.filename = filename;
- }
-
- @Override
- public void run() {
- try {
- // Start getting the response code
- final GetResponseCodeThread responseThread = new GetResponseCodeThread(conn);
-
- responseThread.start();
-
- // Wait for the response to finish
- synchronized (responseThread.monitor) {
- while (!responseThread.isFinished) {
- try {
- responseThread.monitor.wait(sessionTimeout);
- responseThread.interrupt();
- } catch (InterruptedException e) {
- notifyFinish();
- return;
- }
- }
- }
-
- final int responseCode = responseThread.responseCode;
-
- if (responseCode == -1) {
- // Terminate if we did not get the response code
- notifyFinish();
- return;
-
- } else if (responseCode == HttpURLConnection.HTTP_NOT_FOUND) {
- // Terminate if the HTTP page containing the file was not found
- status = DownloadStatus.FILE_NOT_FOUND;
- notifyFinish();
- return;
-
- } else if (responseCode != HttpURLConnection.HTTP_OK) {
- // Generally, terminate if did not receive a OK response
- notifyFinish();
- return;
- }
-
- // Start getting the size of the file to download
- final GetContentLengthThread contentLengthThread = new GetContentLengthThread(conn);
-
- contentLengthThread.start();
-
- // Wait for the file size
- synchronized (contentLengthThread.monitor) {
- while (!contentLengthThread.isFinished) {
- try {
- contentLengthThread.monitor.wait(sessionTimeout);
- contentLengthThread.interrupt();
- } catch (InterruptedException e) {
- notifyFinish();
- return;
- }
- }
- }
-
- final int size = contentLengthThread.contentLength;
-
- if (size == -1) {
- // Terminate if we did not get the content length
- notifyFinish();
- return;
- }
-
- // Get the input stream from the connection
- in = getInputStream(conn);
-
- // Prepare the output stream for the file output
- out = new FileOutputStream(filename);
-
- // Download the file
-
- final byte[] buf = new byte[4096];
-
- int totalRead = 0;
- int bytesRead;
-
- // Start thread for reading bytes into the buffer
-
- while (totalRead < size) {
- // Start reading bytes into the buffer
- final ReadInputStreamToBufferThread readThread = new ReadInputStreamToBufferThread(in, buf);
-
- readThread.start();
-
- // Wait for the reading to finish
- synchronized (readThread.monitor) {
- while (!readThread.isFinished) {
- try {
- readThread.monitor.wait(sessionTimeout);
- readThread.interrupt();
- } catch (InterruptedException e) {
- notifyFinish();
- return;
- }
- }
- }
-
- bytesRead = readThread.bytesRead;
- if (bytesRead == -1) {
- // Read completed has completed
- notifyFinish();
- break;
- }
-
- // Write the byte buffer to the output
- out.write(buf, 0, bytesRead);
-
- totalRead += bytesRead;
- }
-
- // If we reached this point, the download was successful
- status = DownloadStatus.OK;
-
- notifyFinish();
-
- } catch (final IOException e) {
- status = DownloadStatus.COULD_NOT_CONNECT;
- } finally {
- // Make sure the input stream is closed
- if (in != null) {
- try {
- in.close();
- } catch (final IOException e) {
- e.printStackTrace();
- }
- }
- // Make sure the output stream is closed
- if (out != null) {
- try {
- out.close();
- } catch (final IOException e) {
- e.printStackTrace();
- }
- }
- }
- }
- }
-
-
- /**
- * Worker thread used for getting the response code of an already open HTTP connection.
- */
- final static class GetResponseCodeThread extends WorkerThread {
-
- // The response code to read out
- int responseCode;
-
- final HttpURLConnection conn;
-
- GetResponseCodeThread(HttpURLConnection conn) {
- super("FileTransfer: Get response code");
- this.conn = conn;
- }
-
- @Override
- public void run() {
- try {
- // Get the response code
- responseCode = conn.getResponseCode();
- } catch (final Exception e) {
- responseCode = -1;
- }
- // Notify that this thread is finish
- notifyFinish();
- }
- }
-
-
- /**
- * Worker thread used for getting the content length of an already open HTTP connection.
- */
- final static class GetContentLengthThread extends WorkerThread {
-
- // The content length to read out
- int contentLength;
-
- final HttpURLConnection conn;
-
- GetContentLengthThread(HttpURLConnection conn) {
- super("FileTransfer: Get content length");
- this.conn = conn;
- }
-
- @Override
- public void run() {
- try {
- // Get the content length
- contentLength = conn.getContentLength();
- } catch (final Exception e) {
- contentLength = -1;
- }
- // Notify that this thread is finish
- notifyFinish();
- }
- }
-
-
- /**
- * Worker thread used for reading bytes from an already open input stream into a byte buffer.
- */
- final static class ReadInputStreamToBufferThread extends WorkerThread {
-
- int bytesRead;
-
- final InputStream in;
-
- final byte[] buf;
-
- ReadInputStreamToBufferThread(InputStream in, byte[] buf) {
- super("FileTransfer: Read input stream to buffer");
- this.in = in;
- this.buf = buf;
- }
-
- @Override
- public void run() {
- try {
- // Read bytes into the buffer
- bytesRead = in.read(buf);
- } catch (final Exception e) {
- bytesRead = -1;
- }
- // Notify that this thread is finish
- notifyFinish();
- }
- }
-
- /**
- * Copies a file into another file.
- *
- * @param srcFile is the filename of the source file to copy.
- * @param destFile is the filename of the destination file to copy the file into.
- * @return true if the file was copied; false otherwise
- */
- public static boolean copy(String srcFile, String destFile) {
- FileInputStream in = null;
- FileOutputStream out = null;
-
- try {
- if (srcFile.equals(destFile)) {
- throw new IOException("You cannot copy a file onto itself");
- }
- final byte[] buf = new byte[4096];
-
- in = new FileInputStream(srcFile);
- out = new FileOutputStream(destFile);
-
- while (in.available() > 0) {
- out.write(buf, 0, in.read(buf, 0, buf.length));
- }
- } catch (final IOException e) {
- return false;
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- if (out != null) {
- try {
- out.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- return true;
- }
-
- /**
- * Opens and connects to a {@link java.net.HttpURLConnection} for input only, and where the connection timeout and
- * read timeout are controlled by properties.
- *
- * @param url is the URL to open a connection to.
- * @return a HttpURLConnection intended for reading input only.
- * @throws IOException if an I/O exception occurs.
- */
- public static HttpURLConnection connectToHttpInputConnection(URL url) throws IOException {
- return connectToHttpInputConnection(url, null);
- }
-
- /**
- * Opens and connects to a {@link java.net.HttpURLConnection} for input only, and where the connection timeout and
- * read timeout are controlled by properties.
- *
- * @param url is the URL to open a connection to.
- * @param sessionId is a optional session id.
- * @return a HttpURLConnection intended for reading input only.
- * @throws IOException if an I/O exception occurs.
- */
- public static HttpURLConnection connectToHttpInputConnection(URL url, String sessionId) throws IOException {
- HttpURLConnection conn = (HttpURLConnection) openURLConnection(url, false); // not for output
-
- conn.setRequestMethod("GET");
- if (sessionId != null) {
- conn.setRequestProperty("Cookie", sessionId);
- }
- conn.connect();
- return conn;
- }
-
- /**
- * Opens a {link {@link java.net.URLConnection} for output (and input) where the connection timeout and read timeout
- * are controlled by properties.
- *
- * @param url is the URL to open.
- * @return a URLConnection for output.
- * @throws IOException if an I/O exception occurs.
- */
- public static URLConnection openOutputURLConnection(URL url) throws IOException {
- return openURLConnection(url, true); // for output
- }
-
- /**
- * Convenient method used for getting an input stream from an URLConnection.
- * This method checks if a GZIPInputStream or InflaterInputStream should be used to wrap the input stream from the
- * URLConnection depending on the content encoding.
- *
- * @param conn is the URLConnection
- * @return an input stream from the URLConnection, which can be a GZIPInputStream or InflaterInputStream.
- * @throws IOException if an I/O exception occurs.
- */
- public static InputStream getInputStream(URLConnection conn) throws IOException {
- // Get input stream
- InputStream in = conn.getInputStream();
-
- // Get the encoding returned by the server
- String encoding = conn.getContentEncoding();
-
- // Check if we need to use a gzip or inflater input stream depending on the content encoding
- if ("gzip".equalsIgnoreCase(encoding)) {
- in = new GZIPInputStream(in);
- } else if ("deflate".equalsIgnoreCase(encoding)) {
- in = new InflaterInputStream(in);
- }
- return in;
- }
-
- /**
- * Convenient method used for getting an output stream from an URLConnection.
- * This method checks if a GZIPOutputStream or DeflaterOutputStream should be used to wrap the output stream from
- * the URLConnection depending on the content encoding.
- *
- * @param conn is the URLConnection
- * @return an output stream from the URLConnection, which can be a GZIPOutputStream or DeflaterOutputStream.
- * @throws IOException if an I/O exception occurs.
- */
- public static OutputStream getOutputStream(URLConnection conn) throws IOException {
- // Get output stream
- OutputStream out = conn.getOutputStream();
-
- // // Get the encoding returned by the server
- // String encoding = conn.getContentEncoding();
- //
- // // Check if we need to use a gzip or inflater input stream depending on the content encoding
- // if ("gzip".equalsIgnoreCase(encoding)) {
- // out = new GZIPOutputStream(out);
- // } else if ("deflate".equalsIgnoreCase(encoding)) {
- // out = new DeflaterOutputStream(out);
- // }
- return out;
- }
-
- /**
- * Opens a {link {@link java.net.URLConnection} for input and optional output where the connection timeout and read
- * timeout are controlled by properties.
- *
- * @param url is the URL to open.
- * @param isOutput is a flag specifying if the opened connection is for output.
- * @return a URLConnection.
- * @throws IOException if an I/O exception occurs.
- */
- public static URLConnection openURLConnection(URL url, boolean isOutput) throws IOException {
- URLConnection conn = url.openConnection();
-
- conn.setDoInput(true);
- conn.setDoOutput(isOutput);
-
- conn.setConnectTimeout(connectionTimeout);
- conn.setReadTimeout(readTimeout);
-
- if (!isOutput) {
- // Allow both GZip and Deflate (ZLib) encodings
- conn.setRequestProperty("Accept-Encoding", "gzip, deflate");
- conn.setRequestProperty("User-Agent", "RoboRumble@Home - gzip, deflate");
- }
- return conn;
- }
-
- /**
- * Reads the roborumble.properties file and stores property values into global variables.
- */
- private static void readProperties() {
- Properties props = getProperties("./roborumble/roborumble.properties");
-
- // Get connection timeout
- String value = props.getProperty("connection.open.timeout");
-
- if (value != null) {
- try {
- connectionTimeout = Integer.parseInt(value);
- } catch (NumberFormatException ignore) {}
- }
-
- // Get connection read timeout
- value = props.getProperty("connection.read.timeout");
- if (value != null) {
- try {
- readTimeout = Integer.parseInt(value);
- } catch (NumberFormatException ignore) {}
- }
-
- // Get download session timeout
- value = props.getProperty("download.session.timeout");
- if (value != null) {
- try {
- sessionTimeout = Integer.parseInt(value);
- } catch (NumberFormatException ignore) {}
- }
- }
-}
diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/AwtAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/AwtAttack.java
deleted file mode 100644
index 5722779..0000000
--- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/AwtAttack.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package tested.robots;
-
-
-import robocode.AdvancedRobot;
-import robocode.ScannedRobotEvent;
-
-import javax.swing.*;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-
-/**
- * @author Pavel Savara (original)
- */
-public class AwtAttack extends AdvancedRobot {
-
- @Override
- public void run() {
- // noinspection InfiniteLoopStatement
- for (;;) {
- turnLeft(100);
- ahead(10);
- turnLeft(100);
- back(10);
- }
- }
-
- @Override
- public void onScannedRobot(ScannedRobotEvent event) {
- awtAttack();
- }
-
- private void awtAttack() {
- try {
- Runnable doHack = new Runnable() {
- public void run() {
- writeAttack();
-
- JFrame frame;
-
- frame = new JFrame();
- frame.setName("Hack");
- frame.setVisible(true);
-
- }
- };
-
- javax.swing.SwingUtilities.invokeLater(doHack);
- } catch (RuntimeException e) {
- // swalow security exception
- e.printStackTrace(out);
- }
- }
-
- private void writeAttack() {
- FileOutputStream fs;
-
- try {
- fs = new FileOutputStream("C:\\Robocode.attack");
- fs.write(0xBA);
- fs.write(0xDF);
- fs.write(0x00);
- fs.write(0xD0);
- fs.close();
- out.println("Hacked!!!");
- } catch (FileNotFoundException e) {
- e.printStackTrace(out);
- } catch (IOException e) {
- e.printStackTrace(out);
- } catch (RuntimeException e) {
- // swalow security exception
- e.printStackTrace(out);
- }
- }
-
-}
diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorAwtAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorAwtAttack.java
deleted file mode 100644
index 47ae244..0000000
--- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorAwtAttack.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package tested.robots;
-
-
-import javax.swing.*;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-
-/**
- * @author Flemming N. Larsen (original)
- */
-public class ConstructorAwtAttack extends robocode.AdvancedRobot {
-
- public ConstructorAwtAttack() {
- awtAttack();
- }
-
- private void awtAttack() {
- try {
- Runnable doHack = new Runnable() {
- public void run() {
- writeAttack();
-
- JFrame frame;
-
- frame = new JFrame();
- frame.setName("Hack");
- frame.setVisible(true);
-
- }
- };
-
- javax.swing.SwingUtilities.invokeLater(doHack);
- } catch (RuntimeException e) {
- // swallow security exception
- e.printStackTrace(out);
- }
- }
-
- private void writeAttack() {
- FileOutputStream fs;
-
- try {
- fs = new FileOutputStream("C:\\Robocode.attack");
- fs.write(0xBA);
- fs.write(0xDF);
- fs.write(0x00);
- fs.write(0xD0);
- fs.close();
- out.println("Hacked!!!");
- } catch (FileNotFoundException e) {
- e.printStackTrace(out);
- } catch (IOException e) {
- e.printStackTrace(out);
- } catch (RuntimeException e) {
- // swallow security exception
- e.printStackTrace(out);
- }
- }
-}
diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorThreadAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorThreadAttack.java
deleted file mode 100644
index 0c5a0f8..0000000
--- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorThreadAttack.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package tested.robots;
-
-
-/**
- * @author Flemming N. Larsen (original)
- */
-public class ConstructorThreadAttack extends robocode.AdvancedRobot {
-
- public ConstructorThreadAttack() {
- runAttack();
- runAttack2();
- }
-
- private void runAttack() {
- try {
- Attacker a = new Attacker();
- Thread t = new Thread(a);
-
- t.start();
- } catch (RuntimeException e) {
- // swallow security exception
- e.printStackTrace(out);
- }
- }
-
- private void runAttack2() {
- try {
- Attacker a = new Attacker();
- ThreadGroup tg = new ThreadGroup("MyAttack");
-
- tg.setMaxPriority(10);
- Thread t = new Thread(tg, a);
-
- t.start();
- } catch (RuntimeException e) {
- // swallow security exception
- e.printStackTrace(out);
- }
- }
-
- private class Attacker implements Runnable {
-
- public synchronized void run() {
- if (Thread.currentThread().getPriority() > 4) {
- out.println("Priority attack");
- }
- runAttack2();
-
- try {
- this.wait();
- } catch (InterruptedException e) {}
- }
- }
-}
diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/FileAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/FileAttack.java
deleted file mode 100644
index 9f76ccf..0000000
--- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/FileAttack.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package tested.robots;
-
-
-import robocode.AdvancedRobot;
-import robocode.ScannedRobotEvent;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-
-/**
- * @author Pavel Savara (original)
- */
-public class FileAttack extends AdvancedRobot {
-
- @Override
- public void run() {
- // noinspection InfiniteLoopStatement
- for (;;) {
- turnLeft(100);
- ahead(10);
- turnLeft(100);
- back(10);
- }
- }
-
- @Override
- public void onScannedRobot(ScannedRobotEvent event) {
- readAttack();
- writeAttack();
- }
-
- private void readAttack() {
- try {
- FileInputStream fs = new FileInputStream("C:\\MSDOS.SYS");
-
- System.out.print(fs.read());
- System.out.print(fs.read());
- System.out.print(fs.read());
- System.out.print(fs.read());
- fs.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace(out);
- } catch (IOException e) {
- e.printStackTrace(out);
- } catch (RuntimeException e) {
- // swalow security exception
- e.printStackTrace(out);
- }
- }
-
- private void writeAttack() {
- FileOutputStream fs;
-
- try {
- fs = new FileOutputStream("C:\\Robocode.attack");
- fs.write(0xBA);
- fs.write(0xDF);
- fs.write(0x00);
- fs.write(0xD0);
- fs.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace(out);
- } catch (IOException e) {
- e.printStackTrace(out);
- } catch (RuntimeException e) {
- // swalow security exception
- e.printStackTrace(out);
- }
- }
-
-}
diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/IncludeNamespaceAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/IncludeNamespaceAttack.java
deleted file mode 100644
index c5ecdb9..0000000
--- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/IncludeNamespaceAttack.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package tested.robots;
-
-
-import net.sf.robocode.security.HiddenAccess;
-import robocode.AdvancedRobot;
-import robocode.ScannedRobotEvent;
-
-
-/**
- * @author Pavel Savara (original)
- */
-public class IncludeNamespaceAttack extends AdvancedRobot {
-
- @Override
- public void run() {
- // noinspection InfiniteLoopStatement
- for (;;) {
- turnLeft(100);
- ahead(10);
- turnLeft(100);
- back(10);
- }
- }
-
- @Override
- public void onScannedRobot(ScannedRobotEvent event) {
- namespaceAttack();
- }
-
- private void namespaceAttack() {
- try {
- HiddenAccess.createRules(10, 10, 10, 10, 1, false, 100);
- } catch (RuntimeException e) {
- // Swallow security exception
- e.printStackTrace(out);
- }
- }
-}
diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadAttack.java
deleted file mode 100644
index bb21f8c..0000000
--- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadAttack.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package tested.robots;
-
-
-import robocode.AdvancedRobot;
-import robocode.ScannedRobotEvent;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-
-/**
- * @author Pavel Savara (original)
- */
-public class ThreadAttack extends AdvancedRobot {
-
- @Override
- public void run() {
- // noinspection InfiniteLoopStatement
- for (;;) {
- turnLeft(100);
- ahead(10);
- turnLeft(100);
- back(10);
- }
- }
-
- @Override
- public void onScannedRobot(ScannedRobotEvent event) {
- runAttack();
- runAttack2();
- }
-
- private void runAttack() {
- try {
- Attacker a = new Attacker();
- Thread t = new Thread(a);
-
- t.start();
- } catch (RuntimeException e) {
- // swallow security exception
- e.printStackTrace(out);
- }
- }
-
- private void runAttack2() {
- try {
- Attacker a = new Attacker();
- ThreadGroup tg = new ThreadGroup("MyAttack");
-
- tg.setMaxPriority(10);
- Thread t = new Thread(tg, a);
-
- t.start();
- } catch (RuntimeException e) {
- // swallow security exception
- e.printStackTrace(out);
- }
- }
-
- private AtomicInteger counter = new AtomicInteger();
-
- private class Attacker implements Runnable {
-
- public synchronized void run() {
- final int id = counter.incrementAndGet();
-
- out.println("Running id:" + id);
-
- if (Thread.currentThread().getPriority() > 4) {
- out.println("Priority attack");
- }
- runAttack2();
-
- try {
- this.wait();
- } catch (InterruptedException e) {
- out.println("Interrupted id:" + id);
- }
- }
- }
-}
diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadGroupAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadGroupAttack.java
deleted file mode 100644
index 963b549..0000000
--- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadGroupAttack.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package tested.robots;
-
-
-import robocode.*;
-
-
-/**
- * This nasty robot tries to interrupt the thread of each opponent robot that it scans.
- * It enumerates the threads recursively of thread group that is a parent of its own
- * thread group to find out, which threads that are active. These threads are all robot
- * threads.
- *
- * This robot is inspired by the hacker.Destroyer 1.3, which proved a security breach in
- * Robocode 1.7.2.1 Beta. The security breach was reported with:
- * Bug [3021140] Possible for robot to kill other robot threads.
- *
- * The security manager of Robocode must make sure that unsafe (robot) threads cannot
- * access thread groups other than its own thread group within checkAccess(Thread).
- *
- * @author Flemming N. Larsen (original)
- */
-public class ThreadGroupAttack extends Robot {
- private Thread[] threads = new Thread[100];
-
- public void run() {
- runAttack();
-
- while (true) {
- turnGunLeft(30);
- }
- }
-
- private void runAttack() {
- try {
- new Thread(new Runnable() {
- public void run() {
- ThreadGroup parentGroup = Thread.currentThread().getThreadGroup().getParent();
-
- while (true) {
- parentGroup.enumerate(threads, true);
- try {
- Thread.sleep(0);
- } catch (InterruptedException ignore) {}
- }
- }
- }).start();
- } catch (RuntimeException t) {
- t.printStackTrace(out);
- }
- }
-
- public void onScannedRobot(ScannedRobotEvent e) {
- attackRobotThread(e.getName());
- }
-
- private void attackRobotThread(String robotName) {
- for (Thread t : threads) {
- if (t != null && robotName.equals(t.getName())) {
- t.interrupt();
- out.println("Interrupted: " + robotName);
- }
- }
- }
-}
diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/UndeadThread.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/UndeadThread.java
deleted file mode 100644
index 75fcbfa..0000000
--- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/UndeadThread.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package tested.robots;
-
-
-import robocode.AdvancedRobot;
-
-
-/**
- * @author Pavel Savara (original)
- */
-public class UndeadThread extends AdvancedRobot {
-
- @Override
- public void run() {
- out.println("I will live forever!");
- // noinspection InfiniteLoopStatement
- while (true) {
- try {
- body();
- } catch (RuntimeException t) {
- // spamming the console
- out.println("Swalowed it, HA HA HA HA HAAAAA !!!!!");
- out.println(t);
- }
- }
- }
-
- private void body() {
- // noinspection InfiniteLoopStatement
- for (;;) {
- turnLeft(100);
- ahead(10);
- turnLeft(100);
- back(10);
- }
- }
-
-}
diff --git a/workspace_robo4/robocode.tests/src/main/java/net/sf/robocode/test/helpers/Assert.java b/workspace_robo4/robocode.tests/src/main/java/net/sf/robocode/test/helpers/Assert.java
deleted file mode 100644
index 27c29dd..0000000
--- a/workspace_robo4/robocode.tests/src/main/java/net/sf/robocode/test/helpers/Assert.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package net.sf.robocode.test.helpers;
-
-
-import robocode.util.Utils;
-
-
-/**
- * @author Pavel Savara (original)
- */
-public class Assert extends org.junit.Assert {
- public static void assertNear(double v1, double v2) {
- org.junit.Assert.assertEquals(v1, v2, Utils.NEAR_DELTA);
- }
-
- public static void allAssertNear(double v1, double v2) {
- try {
- assertNear(v1, v2);
- } catch (RuntimeException ex) {
- ex.printStackTrace(System.err);
- }
- }
-
- public static void allAssertThat(T t, org.hamcrest.Matcher tMatcher) {
- try {
- org.junit.Assert.assertThat(t, tMatcher);
- } catch (RuntimeException ex) {
- ex.printStackTrace(System.err);
- }
- }
-
-}
diff --git a/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/EditWindow.java b/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/EditWindow.java
deleted file mode 100644
index a0f8e9b..0000000
--- a/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/EditWindow.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package net.sf.robocode.ui.editor;
-
-
-import net.sf.robocode.io.FileUtil;
-import net.sf.robocode.io.Logger;
-import net.sf.robocode.repository.IRepositoryManager;
-import net.sf.robocode.ui.editor.theme.EditorThemeProperties;
-import net.sf.robocode.ui.editor.theme.EditorThemePropertiesManager;
-import net.sf.robocode.ui.editor.theme.EditorThemePropertyChangeAdapter;
-
-import javax.swing.*;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-import javax.swing.event.InternalFrameAdapter;
-import javax.swing.event.InternalFrameEvent;
-import javax.swing.filechooser.FileFilter;
-
-import java.awt.Font;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.util.StringTokenizer;
-
-
-/**
- * @author Mathew A. Nelson (original)
- * @author Flemming N. Larsen (contributor)
- * @author Matthew Reeder (contributor)
- */
-@SuppressWarnings("serial")
-public class EditWindow extends JInternalFrame {
-
- private String fileName;
- private String robotName;
- public boolean modified;
- private final RobocodeEditor editor;
- private final IRepositoryManager repositoryManager;
- private final File robotsDirectory;
- private EditorPanel editorPanel;
- private EditorPane editorPane;
-
- public EditWindow(IRepositoryManager repositoryManager, RobocodeEditor editor, File robotsDirectory) {
- super("Edit Window", true, true, true, true);
- this.editor = editor;
- this.robotsDirectory = robotsDirectory;
- this.repositoryManager = repositoryManager;
- initialize();
- }
-
- public EditorPane getEditorPane() {
- if (editorPane == null) {
- editorPane = editorPanel.getEditorPane();
- InputMap im = editorPane.getInputMap();
-
- // FIXME: Replace hack with better solution than using 'ctrl H'
- im.put(KeyStroke.getKeyStroke("ctrl H"), editor.getReplaceAction());
- }
- return editorPane;
- }
-
- public String getFileName() {
- return fileName;
- }
-
- public String getRobotName() {
- return robotName;
- }
-
- private void initialize() {
- try {
- addInternalFrameListener(new InternalFrameAdapter() {
- @Override
- public void internalFrameClosing(InternalFrameEvent e) {
- if (!modified || fileSave(true)) {
- editor.setLineStatus(-1);
- dispose();
- }
- editor.removeFromWindowMenu(EditWindow.this);
- }
-
- @Override
- public void internalFrameDeactivated(InternalFrameEvent e) {
- editor.setLineStatus(-1);
- }
-
- @Override
- public void internalFrameIconified(InternalFrameEvent e) {
- editor.setLineStatus(-1);
- }
- });
- setFrameIcon(new ImageIcon(EditWindow.class.getResource("/net/sf/robocode/ui/icons/robocode-icon.png")));
- setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
-
- setSize(750, 500);
-
- editor.addToWindowMenu(this);
-
- editorPanel = new EditorPanel();
- setContentPane(editorPanel);
-
- EditorThemeProperties currentThemeProps = EditorThemePropertiesManager.getCurrentEditorThemeProperties();
- Font font = currentThemeProps.getFont();
- editorPanel.setFont(font);
-
- // Make sure the source editor window gets focus with a blinking cursor
- SwingUtilities.invokeLater(new Runnable() {
- @Override
- public void run() {
- editorPanel.getEditorPane().requestFocus();
- }
- });
-
- EditorThemePropertiesManager.addListener(new EditorThemePropertyChangeAdapter() {
- @Override
- public void onFontChanged(Font newFont) {
- editorPanel.setFont(newFont);
- }
- });
-
- final JavaDocument document = (JavaDocument) editorPanel.getEditorPane().getDocument();
-
- document.addDocumentListener(new DocumentListener() {
- public void removeUpdate(DocumentEvent e) {
- updateModificationState();
- }
-
- public void insertUpdate(DocumentEvent e) {
- updateModificationState();
- }
-
- public void changedUpdate(DocumentEvent e) {
- updateModificationState();
- }
-
- // Bug-361 Problem in the text editor related with the .java file modification
- private void updateModificationState() {
- setModified(editorPanel.getEditorPane().isModified());
- }
- });
- } catch (RuntimeException e) {
- Logger.logError(e);
- }
- }
-
- public void setFileName(String newFileName) {
- fileName = newFileName;
- updateTitle();
- }
-
- public void setRobotName(String newRobotName) {
- robotName = newRobotName;
- updateTitle();
- }
-
- private void updateTitle() {
- StringBuffer titleBuf = new StringBuffer("Editing");
- if (fileName != null) {
- titleBuf.append(" - ").append(fileName);
- } else if (robotName != null) {
- titleBuf.append(" - ").append(robotName);
- }
- if (modified) {
- titleBuf.append(" *");
- }
- setTitle(titleBuf.toString());
- }
-
- private void setModified(boolean modified) {
- boolean updated = (modified != this.modified);
- if (updated) {
- this.modified = modified;
- updateTitle();
- editor.setSaveFileMenuItemsEnabled(modified);
- }
- }
-
- public void compile() {
- if (!fileSave(true, true)) {
- error("You must save before compiling.");
- return;
- }
- if (editor.getCompiler() != null) {
- // The compiler + refresh of the repository is done in a thread in order to avoid the compiler
- // window hanging while compiling. The SwingUtilities.invokeLater() does not do a good job here
- // (window is still hanging). Hence, a real thread running beside the EDT is used, which does a
- // great job, where each each new print from the compiler is written out as soon as it is ready
- // in the output stream.
- new Thread(new Runnable() {
- public void run() {
- if (fileName == null) {
- error("You must save before compiling.");
- return;
- }
- editor.getCompiler().compile(getRobotDir(), fileName);
- repositoryManager.refresh(fileName);
- }
- }).start();
- } else {
- JOptionPane.showMessageDialog(editor, "No compiler installed.", "Error", JOptionPane.ERROR_MESSAGE);
- }
- }
-
- private void error(String msg) {
- Object[] options = {
- "OK"
- };
-
- JOptionPane.showOptionDialog(this, msg, "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE, null,
- options, options[0]);
- }
-
- public boolean fileSave(boolean confirm) {
- return fileSave(confirm, false);
- }
-
- private boolean fileSave(boolean confirm, boolean mustSave) {
- if (confirm) {
- if (!modified) {
- return true;
- }
- String s = fileName;
-
- if (s == null) {
- s = robotName;
- }
- if (s == null) {
- s = "This file";
- }
- int ok = JOptionPane.showConfirmDialog(this, s + " has been modified. Do you wish to save it?",
- "Modified file", JOptionPane.YES_NO_CANCEL_OPTION);
-
- if (ok == JOptionPane.NO_OPTION) {
- return !mustSave;
- }
- if (ok == JOptionPane.CANCEL_OPTION) {
- return false;
- }
- }
- String fileName = getFileName();
-
- if (fileName == null) {
- return fileSaveAs();
- }
-
- String reasonableFilename = getReasonableFilename();
-
- if (reasonableFilename != null) {
- try {
- String a = new File(reasonableFilename).getCanonicalPath();
- String b = new File(fileName).getCanonicalPath();
-
- if (!a.equals(b)) {
- int ok = JOptionPane.showConfirmDialog(this,
- fileName + " should be saved in: \n" + reasonableFilename
- + "\n Would you like to save it there instead?",
- "Name has changed",
- JOptionPane.YES_NO_CANCEL_OPTION);
-
- if (ok == JOptionPane.CANCEL_OPTION) {
- return false;
- }
- if (ok == JOptionPane.YES_OPTION) {
- return fileSaveAs();
- }
- }
- } catch (IOException e) {
- Logger.logError("Unable to check reasonable filename: ", e);
- }
- }
-
- BufferedWriter bufferedWriter = null;
- OutputStreamWriter outputStreamWriter = null;
- FileOutputStream fileOutputStream = null;
-
- try {
- fileOutputStream = new FileOutputStream(fileName);
- outputStreamWriter = new OutputStreamWriter(fileOutputStream, "UTF8");
- bufferedWriter = new BufferedWriter(outputStreamWriter);
-
- getEditorPane().write(bufferedWriter);
- setModified(false);
- } catch (IOException e) {
- error("Cannot write file: " + e);
- return false;
- } finally {
- FileUtil.cleanupStream(bufferedWriter);
- }
- return true;
- }
-
- private String getRobotDir() {
- String saveDir = robotsDirectory.getPath() + File.separatorChar;
-
- String text = getEditorPane().getText();
- int pIndex = text.indexOf("package ");
-
- if (pIndex >= 0) {
- int pEIndex = text.indexOf(";", pIndex);
-
- if (pEIndex > 0) {
- String packageTree = text.substring(pIndex + 8, pEIndex) + File.separatorChar;
-
- packageTree = packageTree.replace('.', File.separatorChar);
-
- saveDir += packageTree;
- }
- }
- return saveDir;
- }
-
- public boolean fileSaveAs() {
- String javaFileName = null;
- String saveDir = getRobotDir();
-
- String text = getEditorPane().getText();
-
- int pIndex = text.indexOf("public class ");
-
- if (pIndex >= 0) {
- int pEIndex = text.indexOf(" ", pIndex + 13);
-
- if (pEIndex > 0) {
- int pEIndex2 = text.indexOf("\n", pIndex + 13);
-
- if (pEIndex2 > 0 && pEIndex2 < pEIndex) {
- pEIndex = pEIndex2;
- }
- javaFileName = text.substring(pIndex + 13, pEIndex).trim() + ".java";
- } else {
- pEIndex = text.indexOf("\n", pIndex + 13);
- if (pEIndex > 0) {
- javaFileName = text.substring(pIndex + 13, pEIndex).trim() + ".java";
- }
- }
- }
-
- File f = new File(saveDir);
-
- if (!f.exists()) {
- int ok = JOptionPane.showConfirmDialog(this,
- "Your robot should be saved in the directory: " + saveDir
- + "\nThis directory does not exist, would you like to create it?",
- "Create Directory",
- JOptionPane.YES_NO_CANCEL_OPTION);
-
- if (ok == JOptionPane.YES_OPTION) {
- if (!f.exists() && !f.mkdirs()) {
- Logger.logError("Cannot create: " + f);
- }
- f = new File(saveDir);
- }
- if (ok == JOptionPane.CANCEL_OPTION) {
- return false;
- }
- }
-
- JFileChooser chooser;
-
- chooser = new JFileChooser(f);
- chooser.setCurrentDirectory(f);
-
- FileFilter filter = new FileFilter() {
- @Override
- public boolean accept(File pathname) {
- if (pathname.isDirectory()) {
- return true;
- }
- String fn = pathname.getName();
- int idx = fn.lastIndexOf('.');
- String extension = "";
-
- if (idx >= 0) {
- extension = fn.substring(idx);
- }
- return extension.equalsIgnoreCase(".java");
- }
-
- @Override
- public String getDescription() {
- return "Robots";
- }
- };
-
- chooser.setFileFilter(filter);
-
- boolean done = false;
-
- while (!done) {
- done = true;
- if (javaFileName != null) {
- chooser.setSelectedFile(new File(f, javaFileName));
- }
- int rv = chooser.showSaveDialog(this);
- String robotFileName;
-
- if (rv == JFileChooser.APPROVE_OPTION) {
- robotFileName = chooser.getSelectedFile().getPath();
- File outFile = new File(robotFileName);
-
- if (outFile.exists()) {
- int ok = JOptionPane.showConfirmDialog(this,
- robotFileName + " already exists. Are you sure you want to replace it?", "Warning",
- JOptionPane.YES_NO_CANCEL_OPTION);
-
- if (ok == JOptionPane.NO_OPTION) {
- done = false;
- continue;
- }
- if (ok == JOptionPane.CANCEL_OPTION) {
- return false;
- }
- }
- setFileName(robotFileName);
- fileSave(false);
- } else {
- return false;
- }
- }
-
- return true;
- }
-
- public String getPackage() {
- String text = getEditorPane().getText();
- int pIndex = text.indexOf("package ");
-
- if (pIndex >= 0) {
- int pEIndex = text.indexOf(";", pIndex);
-
- if (pEIndex > 0) {
- return text.substring(pIndex + 8, pEIndex);
- }
- }
- return "";
- }
-
- private String getReasonableFilename() {
- StringBuffer fileName = new StringBuffer(robotsDirectory.getPath()).append(File.separatorChar);
- String javaFileName;
- String packageTree = null;
-
- String text = getEditorPane().getText();
- StringTokenizer tokenizer = new StringTokenizer(text, " \t\r\n;");
- String token;
- boolean inComment = false;
-
- while (tokenizer.hasMoreTokens()) {
- token = tokenizer.nextToken();
- if (!inComment && (token.equals("/*") || token.equals("/**"))) {
- inComment = true;
- }
- if (inComment && (token.equals("*/") || token.equals("**/"))) {
- inComment = false;
- }
- if (inComment) {
- continue;
- }
-
- if (packageTree == null && token.equals("package")) {
- packageTree = tokenizer.nextToken();
- if (packageTree == null || packageTree.length() == 0) {
- return null;
- }
- packageTree = packageTree.replace('.', File.separatorChar);
- packageTree += File.separator;
- fileName.append(packageTree);
- }
- if (token.equals("class")) {
- javaFileName = tokenizer.nextToken() + ".java";
- fileName.append(javaFileName);
- return fileName.toString();
- }
- }
- return null;
- }
-}
diff --git a/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/WindowMenuItem.java b/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/WindowMenuItem.java
deleted file mode 100644
index bda1627..0000000
--- a/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/WindowMenuItem.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package net.sf.robocode.ui.editor;
-
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.io.File;
-
-
-/**
- * Customized JMenuItem where each item is bound to a specific JInternalFrame,
- * so we can have a dynamic menu of open windows.
- *
- * @author Matthew Reeder (original)
- */
-@SuppressWarnings("serial")
-public class WindowMenuItem extends JCheckBoxMenuItem implements ActionListener {
-
- // Maximum number of windows that will be shown on the menu (to get the rest, you'll
- // have to open the dialog). The number 9 is also the number of most recently used
- // files that normally show up in other applications. The reason is so that you can
- // give them dynamic hotkeys from 1 to 9. Otherwise, there's no reason (besides
- // avoiding taking up way too much space) to limit the size of the menu.
- public static final int WINDOW_MENU_MAX_SIZE = 9;
- // Number of static menu items before the dynamic menu (including seperators)
- public static final int PRECEDING_WINDOW_MENU_ITEMS = 3;
- // Number of static menu items after the dynamic menu (including seperators
- // and the More Windows... menu item)
- public static final int SUBSEQUENT_WINDOW_MENU_ITEMS = 1;
- // Normal max length of a window name
- public static final int MAX_WINDOW_NAME_LENGTH = 30;
- // I make one "special" menu item that isn't tied to a window. Since it has
- // similar needs for enabling/visibility and labeling, I made it the same class.
- public static final int REGULAR_WINDOW = 0, SPECIAL_MORE = 2;
- private EditWindow window;
- private JMenu parentMenu;
- private final int type;
-
- public WindowMenuItem(EditWindow window, JMenu parentMenu) {
- super();
- this.window = window;
- this.parentMenu = parentMenu;
- type = REGULAR_WINDOW;
- parentMenu.add(this, parentMenu.getMenuComponentCount() - SUBSEQUENT_WINDOW_MENU_ITEMS);
- addActionListener(this);
- }
-
- /**
- * WindowMenuItem Constructor for "More Windows..." menu.
- */
- public WindowMenuItem() {
- type = SPECIAL_MORE;
- }
-
- /**
- * Event handler for the menu item
- *
- * Brings the window to the front. This should be called for the "More
- * Windows..." Item, because it doesn't make itself its own ActionListener.
- *
- * Note that e can be null, and this menu item might not be showing (if this
- * is called from the "More Windows" dialog).
- */
- public void actionPerformed(ActionEvent e) {
- if (window.isIcon()) {
- try {
- window.setIcon(false);
- } catch (RuntimeException ignored) {}
- }
- if (window.getDesktopPane() != null) {
- window.getDesktopPane().setSelectedFrame(window);
- }
- window.toFront();
- window.grabFocus();
- try {
- window.setSelected(true);
- } catch (RuntimeException ignored) {}
- }
-
- /**
- * Returns the label that should be used. If the menu item is supposed to be
- * hidden, this may not be a real valid label.
- */
- @Override
- public String getText() {
- if (type == SPECIAL_MORE) {
- Container parent = getParent();
-
- if (parent == null) {
- return "";
- }
-
- int numWindows = parent.getComponentCount() - PRECEDING_WINDOW_MENU_ITEMS - SUBSEQUENT_WINDOW_MENU_ITEMS;
-
- if (numWindows <= 0) {
- return "No Windows Open";
- }
-
- return "More Windows...";
- }
- if (window == null || parentMenu == null) {
- return "";
- }
- String text = (getIndex() + 1) + " " + getFileName();
-
- if (window.modified) {
- text += " *";
- }
- return text;
- }
-
- protected String getFileName() {
- if (window.getFileName() == null) {
- return "Untitled " + (getPrecedingNewFiles() + 1);
- }
-
- String name = window.getFileName();
-
- if (name.length() < MAX_WINDOW_NAME_LENGTH) {
- return name;
- }
- if (name.indexOf(File.separatorChar) < 0) {
- return name;
- } // If there are no separators, I can't really intelligently truncate.
- int startLength = name.indexOf(File.separatorChar, 1) + 1;
- int endLength = name.length() - name.lastIndexOf(File.separatorChar);
-
- if (endLength + startLength + 3 > name.length()) {
- return name;
- } // return name anyways, since we're not getting it any shorter.
-
- boolean change;
-
- do {
- change = false;
- int newEndLength = name.length() - name.lastIndexOf(File.separatorChar, name.length() - endLength - 1);
-
- if (newEndLength + startLength + 3 <= MAX_WINDOW_NAME_LENGTH) {
- endLength = newEndLength;
- change = true;
- }
- int newStartLength = name.indexOf(File.separatorChar, startLength + 1) + 1;
-
- if (endLength + startLength + 3 <= MAX_WINDOW_NAME_LENGTH) {
- startLength = newStartLength;
- change = true;
- }
- } while (change);
-
- return name.substring(0, startLength) + "..." + name.substring(name.length() - endLength);
- }
-
- /**
- * @return how many nameless windows occur before this one in the parent.
- */
- protected int getPrecedingNewFiles() {
- int count = 0;
-
- for (int i = 0; i < WINDOW_MENU_MAX_SIZE
- && i < parentMenu.getMenuComponentCount() - PRECEDING_WINDOW_MENU_ITEMS - SUBSEQUENT_WINDOW_MENU_ITEMS
- && parentMenu.getMenuComponent(i + PRECEDING_WINDOW_MENU_ITEMS) != this; i++) {
- if (parentMenu.getMenuComponent(i + PRECEDING_WINDOW_MENU_ITEMS) instanceof WindowMenuItem
- && ((WindowMenuItem) parentMenu.getMenuComponent(i + PRECEDING_WINDOW_MENU_ITEMS)).window.getFileName()
- == null) {
- count++;
- }
- }
- return count;
- }
-
- /**
- * Figures out what index (from 0 to WINDOW_MENU_MAX_SIZE-1) this item is in
- * the window menu.
- *
- * @return -1 if this item isn't showing.
- */
- protected int getIndex() {
- for (int i = 0; i < WINDOW_MENU_MAX_SIZE
- && i < parentMenu.getMenuComponentCount() - PRECEDING_WINDOW_MENU_ITEMS - SUBSEQUENT_WINDOW_MENU_ITEMS; i++) {
- if (this == parentMenu.getMenuComponent(i + PRECEDING_WINDOW_MENU_ITEMS)) {
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Returns the index of the character in the label that should be underlined
- */
- @Override
- public int getDisplayedMnemonicIndex() {
- return (type == SPECIAL_MORE) ? 11 : 0;
- }
-
- /**
- * Returns the keyboard mnemonic for this item, which is the virtual key
- * code for its 1-based index.
- */
- @Override
- public int getMnemonic() {
- return (type == SPECIAL_MORE) ? KeyEvent.VK_S : KeyEvent.VK_1 + getIndex();
- }
-
- /**
- * Returns true if this item should be showing.
- *
- * Returns false if there are more than WINDOW_MENU_MAX_SIZE items before it
- * in the menu.
- */
- @Override
- public boolean isVisible() {
- if (type == SPECIAL_MORE) {
- Container parent = getParent();
-
- if (parent == null) {
- return true;
- }
- int numWindows = parent.getComponentCount() - PRECEDING_WINDOW_MENU_ITEMS - SUBSEQUENT_WINDOW_MENU_ITEMS;
-
- updateSelection();
- return (numWindows <= 0) || (numWindows > WINDOW_MENU_MAX_SIZE);
- }
- updateSelection();
- return getIndex() >= 0;
- }
-
- /**
- * Returns true if this item should be enabled (selectable).
- *
- * Returns false if it is a More Windows... item and there are no windows.
- */
- @Override
- public boolean isEnabled() {
- if (type == SPECIAL_MORE) {
- Container parent = getParent();
-
- if (parent == null) {
- return true;
- }
- int numWindows = parent.getComponentCount() - PRECEDING_WINDOW_MENU_ITEMS - SUBSEQUENT_WINDOW_MENU_ITEMS;
-
- return (numWindows > 0);
- }
- return true;
- }
-
- /**
- * Determines if this menu item should currently show as "selected".
- *
- * The item should be seleced if the window it's tied to has focus.
- */
- @Override
- public boolean isSelected() {
- return (type != SPECIAL_MORE) && (window != null && window.getDesktopPane() != null)
- && window.getDesktopPane().getSelectedFrame() == window;
- }
-
- /**
- * Makes sure the underlying menu item knows if we're selected.
- */
- public void updateSelection() {
- setSelected(isSelected()); // Sort of a silly thing to do...
- setEnabled(isEnabled());
- }
-
- /**
- * @return the EditWindow that this menu item is tied to.
- */
- public EditWindow getEditWindow() {
- return window;
- }
-
- /**
- * Creates a string representation of this object.
- *
- * Handy for repurposing the menu items as list items :-)
- */
- @Override
- public String toString() {
- return (type == SPECIAL_MORE) ? "" : getFileName();
- }
-}
diff --git a/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/WindowManager.java b/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/WindowManager.java
deleted file mode 100644
index bbdae95..0000000
--- a/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/WindowManager.java
+++ /dev/null
@@ -1,632 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package net.sf.robocode.ui;
-
-
-import net.sf.robocode.battle.BattleProperties;
-import net.sf.robocode.battle.BattleResultsTableModel;
-import net.sf.robocode.battle.IBattleManager;
-import net.sf.robocode.core.Container;
-import net.sf.robocode.host.ICpuManager;
-import net.sf.robocode.io.FileUtil;
-import net.sf.robocode.repository.IRepositoryManager;
-import net.sf.robocode.settings.ISettingsManager;
-import net.sf.robocode.ui.battle.AwtBattleAdaptor;
-import net.sf.robocode.ui.dialog.*;
-import net.sf.robocode.ui.packager.RobotPackager;
-import net.sf.robocode.ui.editor.IRobocodeEditor;
-import net.sf.robocode.version.IVersionManager;
-import robocode.control.events.BattleCompletedEvent;
-import robocode.control.events.IBattleListener;
-import robocode.control.snapshot.ITurnSnapshot;
-
-import javax.swing.*;
-import javax.swing.filechooser.FileFilter;
-import java.awt.*;
-import java.io.File;
-import java.io.IOException;
-import java.util.Locale;
-
-
-/**
- * @author Mathew A. Nelson (original)
- * @author Flemming N. Larsen (contributor)
- * @author Luis Crespo (contributor)
- */
-public class WindowManager implements IWindowManagerExt {
-
- private final static int TIMER_TICKS_PER_SECOND = 50;
- private final AwtBattleAdaptor awtAdaptor;
- private RobotPackager robotPackager;
- private RobotExtractor robotExtractor;
- private final ISettingsManager settingsManager;
- private final IBattleManager battleManager;
- private final ICpuManager cpuManager;
- private final IRepositoryManager repositoryManager;
- private final IVersionManager versionManager;
- private final IImageManager imageManager;
- private IRobotDialogManager robotDialogManager;
- private RobocodeFrame robocodeFrame;
-
- private boolean isGUIEnabled = true;
- private boolean isSlave;
- private boolean centerRankings = true;
- private boolean oldRankingHideState = true;
- private boolean showResults = true;
-
- public WindowManager(ISettingsManager settingsManager, IBattleManager battleManager, ICpuManager cpuManager, IRepositoryManager repositoryManager, IImageManager imageManager, IVersionManager versionManager) {
- this.settingsManager = settingsManager;
- this.battleManager = battleManager;
- this.repositoryManager = repositoryManager;
- this.cpuManager = cpuManager;
- this.versionManager = versionManager;
- this.imageManager = imageManager;
- awtAdaptor = new AwtBattleAdaptor(battleManager, TIMER_TICKS_PER_SECOND, true);
-
- // we will set UI better priority than robots and battle have
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- Thread.currentThread().setPriority(Thread.NORM_PRIORITY + 2);
- } catch (SecurityException ex) {// that's a pity
- }
- }
- });
- }
-
- public void setBusyPointer(boolean enabled) {
- robocodeFrame.setBusyPointer(enabled);
- }
-
- public synchronized void addBattleListener(IBattleListener listener) {
- awtAdaptor.addListener(listener);
- }
-
- public synchronized void removeBattleListener(IBattleListener listener) {
- awtAdaptor.removeListener(listener);
- }
-
- public boolean isGUIEnabled() {
- return isGUIEnabled;
- }
-
- public void setEnableGUI(boolean enable) {
- isGUIEnabled = enable;
-
- // Set the system property so the AWT headless mode.
- // Read more about headless mode here:
- // http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/
- System.setProperty("java.awt.headless", "" + !enable);
- }
-
- public void setSlave(boolean value) {
- isSlave = value;
- }
-
- public boolean isSlave() {
- return isSlave;
- }
-
- public boolean isIconified() {
- return robocodeFrame.isIconified();
- }
-
- public boolean isShowResultsEnabled() {
- return settingsManager.getOptionsCommonShowResults() && showResults;
- }
-
- public void setEnableShowResults(boolean enable) {
- showResults = enable;
- }
-
- public ITurnSnapshot getLastSnapshot() {
- return awtAdaptor.getLastSnapshot();
- }
-
- public int getFPS() {
- return isIconified() ? 0 : awtAdaptor.getFPS();
- }
-
- public RobocodeFrame getRobocodeFrame() {
- if (robocodeFrame == null) {
- this.robocodeFrame = Container.getComponent(RobocodeFrame.class);
- }
- return robocodeFrame;
- }
-
- public void showRobocodeFrame(boolean visible, boolean iconified) {
- RobocodeFrame frame = getRobocodeFrame();
-
- if (iconified) {
- frame.setState(Frame.ICONIFIED);
- }
-
- if (visible) {
- // Pack frame to size all components
- WindowUtil.packCenterShow(frame);
-
- WindowUtil.setStatusLabel(frame.getStatusLabel());
-
- frame.checkUpdateOnStart();
-
- } else {
- frame.setVisible(false);
- }
- }
-
- public void showAboutBox() {
- packCenterShow(Container.getComponent(AboutBox.class), true);
- }
-
- public String showBattleOpenDialog(final String defExt, final String name) {
- JFileChooser chooser = new JFileChooser(battleManager.getBattlePath());
-
- chooser.setFileFilter(
- new FileFilter() {
- @Override
- public boolean accept(File pathname) {
- return pathname.isDirectory()
- || pathname.getName().toLowerCase().lastIndexOf(defExt.toLowerCase())
- == pathname.getName().length() - defExt.length();
- }
-
- @Override
- public String getDescription() {
- return name;
- }
- });
-
- if (chooser.showOpenDialog(getRobocodeFrame()) == JFileChooser.APPROVE_OPTION) {
- return chooser.getSelectedFile().getPath();
- }
- return null;
- }
-
- public String saveBattleDialog(String path, final String defExt, final String name) {
- File f = new File(path);
-
- JFileChooser chooser;
-
- chooser = new JFileChooser(f);
-
- javax.swing.filechooser.FileFilter filter = new javax.swing.filechooser.FileFilter() {
- @Override
- public boolean accept(File pathname) {
- return pathname.isDirectory()
- || pathname.getName().toLowerCase().lastIndexOf(defExt.toLowerCase())
- == pathname.getName().length() - defExt.length();
- }
-
- @Override
- public String getDescription() {
- return name;
- }
- };
-
- chooser.setFileFilter(filter);
- int rv = chooser.showSaveDialog(getRobocodeFrame());
- String result = null;
-
- if (rv == JFileChooser.APPROVE_OPTION) {
- result = chooser.getSelectedFile().getPath();
- int idx = result.lastIndexOf('.');
- String extension = "";
-
- if (idx > 0) {
- extension = result.substring(idx);
- }
- if (!(extension.equalsIgnoreCase(defExt))) {
- result += defExt;
- }
- }
- return result;
- }
-
- public void showVersionsTxt() {
- showInBrowser("file://" + new File(FileUtil.getCwd(), "").getAbsoluteFile() + File.separator + "versions.md");
- }
-
- public void showHelpApi() {
- showInBrowser(
- "file://" + new File(FileUtil.getCwd(), "").getAbsoluteFile() + File.separator + "javadoc" + File.separator
- + "index.html");
- }
-
- public void showReadMe() {
- showInBrowser("file://" + new File(FileUtil.getCwd(), "ReadMe.html").getAbsoluteFile());
- }
-
- public void showFaq() {
- showInBrowser("http://robowiki.net/w/index.php?title=Robocode/FAQ");
- }
-
- public void showOnlineHelp() {
- showInBrowser("http://robowiki.net/w/index.php?title=Robocode/Getting_Started");
- }
-
- public void showJavaDocumentation() {
- showInBrowser("http://docs.oracle.com/javase/6/docs/api/");
- }
-
- public void showRobocodeHome() {
- showInBrowser("http://robocode.sourceforge.net");
- }
-
- public void showRoboWiki() {
- showInBrowser("http://robowiki.net");
- }
-
- public void showGoogleGroupRobocode() {
- showInBrowser("https://groups.google.com/forum/?fromgroups#!forum/robocode");
- }
-
- public void showRobocodeRepository() {
- showInBrowser("http://robocoderepository.com");
- }
-
- public void showOptionsPreferences() {
- try {
- battleManager.pauseBattle();
-
- WindowUtil.packCenterShow(getRobocodeFrame(), Container.getComponent(PreferencesDialog.class));
- } finally {
- battleManager.resumeIfPausedBattle(); // THIS is just dirty hack-fix of more complex problem with desiredTPS and pausing. resumeBattle() belongs here.
- }
- }
-
- public void showResultsDialog(BattleCompletedEvent event) {
- final ResultsDialog dialog = Container.getComponent(ResultsDialog.class);
-
- dialog.setup(event.getSortedResults(), event.getBattleRules().getNumRounds());
- packCenterShow(dialog, true);
- }
-
- public void showRankingDialog(boolean visible) {
- boolean currentRankingHideState = settingsManager.getOptionsCommonDontHideRankings();
-
- // Check if the Ranking hide states has changed
- if (currentRankingHideState != oldRankingHideState) {
- // Remove current visible RankingDialog, if it is there
- Container.getComponent(RankingDialog.class).dispose();
-
- // Replace old RankingDialog, as the owner window must be replaced from the constructor
- Container.cache.removeComponent(RankingDialog.class);
- Container.cache.addComponent(RankingDialog.class);
-
- // Reset flag for centering the dialog the first time it is shown
- centerRankings = true;
- }
-
- RankingDialog rankingDialog = Container.getComponent(RankingDialog.class);
-
- if (visible) {
- packCenterShow(rankingDialog, centerRankings);
- centerRankings = false; // only center the first time Rankings are shown
- } else {
- rankingDialog.dispose();
- }
-
- // Save current Ranking hide state
- oldRankingHideState = currentRankingHideState;
- }
-
- public void showRobocodeEditor() {
- JFrame editor = (JFrame) net.sf.robocode.core.Container.getComponent(IRobocodeEditor.class);
-
- if (!editor.isVisible()) {
- WindowUtil.packCenterShow(editor);
- } else {
- editor.setVisible(true);
- }
- }
-
- public void showRobotPackager() {
- if (robotPackager != null) {
- robotPackager.dispose();
- robotPackager = null;
- }
-
- robotPackager = net.sf.robocode.core.Container.factory.getComponent(RobotPackager.class);
- WindowUtil.packCenterShow(robotPackager);
- }
-
- public void showRobotExtractor(JFrame owner) {
- if (robotExtractor != null) {
- robotExtractor.dispose();
- robotExtractor = null;
- }
-
- robotExtractor = new net.sf.robocode.ui.dialog.RobotExtractor(owner, this, repositoryManager);
- WindowUtil.packCenterShow(robotExtractor);
- }
-
- public void showSplashScreen() {
- RcSplashScreen splashScreen = Container.getComponent(RcSplashScreen.class);
-
- packCenterShow(splashScreen, true);
-
- WindowUtil.setStatusLabel(splashScreen.getSplashLabel());
-
- repositoryManager.reload(versionManager.isLastRunVersionChanged());
-
- WindowUtil.setStatusLabel(splashScreen.getSplashLabel());
- cpuManager.getCpuConstant();
-
- WindowUtil.setStatus("");
- WindowUtil.setStatusLabel(null);
-
- splashScreen.dispose();
- }
-
- public void showNewBattleDialog(BattleProperties battleProperties) {
- try {
- battleManager.pauseBattle();
- final NewBattleDialog battleDialog = Container.createComponent(NewBattleDialog.class);
-
- battleDialog.setup(settingsManager, battleProperties);
- WindowUtil.packCenterShow(getRobocodeFrame(), battleDialog);
- } finally {
- battleManager.resumeBattle();
- }
- }
-
- public boolean closeRobocodeEditor() {
- IRobocodeEditor editor = net.sf.robocode.core.Container.getComponent(IRobocodeEditor.class);
-
- return editor == null || !((JFrame) editor).isVisible() || editor.close();
- }
-
- public void showCreateTeamDialog() {
- TeamCreator teamCreator = Container.getComponent(TeamCreator.class);
-
- WindowUtil.packCenterShow(teamCreator);
- }
-
- public void showImportRobotDialog() {
- JFileChooser chooser = new JFileChooser();
-
- chooser.setFileFilter(new FileFilter() {
- @Override
- public boolean accept(File pathname) {
- if (pathname.isHidden()) {
- return false;
- }
- if (pathname.isDirectory()) {
- return true;
- }
- String filename = pathname.getName();
-
- if (filename.equals("robocode.jar")) {
- return false;
- }
- int idx = filename.lastIndexOf('.');
-
- String extension = "";
-
- if (idx >= 0) {
- extension = filename.substring(idx);
- }
- return extension.equalsIgnoreCase(".jar") || extension.equalsIgnoreCase(".zip");
- }
-
- @Override
- public String getDescription() {
- return "Jar Files";
- }
- });
-
- chooser.setDialogTitle("Select the robot .jar file to copy to " + repositoryManager.getRobotsDirectory());
-
- if (chooser.showDialog(getRobocodeFrame(), "Import") == JFileChooser.APPROVE_OPTION) {
- File inputFile = chooser.getSelectedFile();
- String fileName = inputFile.getName();
- String extension = "";
-
- int idx = fileName.lastIndexOf('.');
-
- if (idx >= 0) {
- extension = fileName.substring(idx);
- }
- if (!extension.equalsIgnoreCase(".jar")) {
- fileName += ".jar";
- }
- File outputFile = new File(repositoryManager.getRobotsDirectory(), fileName);
-
- if (inputFile.equals(outputFile)) {
- JOptionPane.showMessageDialog(getRobocodeFrame(),
- outputFile.getName() + " is already in the robots directory!");
- return;
- }
- if (outputFile.exists()) {
- if (JOptionPane.showConfirmDialog(getRobocodeFrame(), outputFile + " already exists. Overwrite?",
- "Warning", JOptionPane.YES_NO_OPTION)
- == JOptionPane.NO_OPTION) {
- return;
- }
- }
- if (JOptionPane.showConfirmDialog(getRobocodeFrame(),
- "Robocode will now copy " + inputFile.getName() + " to " + outputFile.getParent(), "Import robot",
- JOptionPane.OK_CANCEL_OPTION)
- == JOptionPane.OK_OPTION) {
- try {
- FileUtil.copy(inputFile, outputFile);
- repositoryManager.refresh();
- JOptionPane.showMessageDialog(getRobocodeFrame(), "Robot imported successfully.");
- } catch (IOException e) {
- JOptionPane.showMessageDialog(getRobocodeFrame(), "Import failed: " + e);
- }
- }
- }
- }
-
- /**
- * Shows a web page using the browser manager.
- *
- * @param url The URL of the web page
- */
- private void showInBrowser(String url) {
- try {
- BrowserManager.openURL(url);
- } catch (IOException e) {
- JOptionPane.showMessageDialog(getRobocodeFrame(), e.getMessage(), "Unable to open browser!",
- JOptionPane.ERROR_MESSAGE);
- }
- }
-
- public void showSaveResultsDialog(BattleResultsTableModel tableModel) {
- JFileChooser chooser = new JFileChooser();
-
- chooser.setFileFilter(new FileFilter() {
-
- @Override
- public boolean accept(File pathname) {
- if (pathname.isHidden()) {
- return false;
- }
- if (pathname.isDirectory()) {
- return true;
- }
- String filename = pathname.getName();
- int idx = filename.lastIndexOf('.');
-
- String extension = "";
-
- if (idx >= 0) {
- extension = filename.substring(idx);
- }
- return extension.equalsIgnoreCase(".csv");
- }
-
- @Override
- public String getDescription() {
- return "Comma Separated Value (CSV) File Format";
- }
- });
-
- chooser.setDialogTitle("Save battle results");
-
- if (chooser.showSaveDialog(getRobocodeFrame()) == JFileChooser.APPROVE_OPTION) {
-
- String filename = chooser.getSelectedFile().getPath();
-
- if (!filename.endsWith(".csv")) {
- filename += ".csv";
- }
-
- boolean append = settingsManager.getOptionsCommonAppendWhenSavingResults();
-
- tableModel.saveToFile(filename, append);
- }
- }
-
- /**
- * Packs, centers, and shows the specified window on the screen.
- * @param window the window to pack, center, and show
- * @param center {@code true} if the window must be centered; {@code false} otherwise
- */
- private void packCenterShow(Window window, boolean center) {
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-
- window.pack();
- if (center) {
- window.setLocation((screenSize.width - window.getWidth()) / 2, (screenSize.height - window.getHeight()) / 2);
- }
- window.setVisible(true);
- }
-
- public void cleanup() {
- if (isGUIEnabled()) {
- getRobocodeFrame().dispose();
- }
- }
-
- public void setStatus(String s) {
- WindowUtil.setStatus(s);
- }
-
- public void messageWarning(String s) {
- WindowUtil.messageWarning(s);
- }
-
- public IRobotDialogManager getRobotDialogManager() {
- if (robotDialogManager == null) {
- robotDialogManager = new RobotDialogManager();
- }
- return robotDialogManager;
- }
-
- public void init() {
- setLookAndFeel();
- imageManager.initialize(); // Make sure this one is initialized so all images are available
- awtAdaptor.subscribe(isGUIEnabled);
- }
-
- /**
- * Sets the Look and Feel (LAF). This method first try to set the LAF to the
- * system's LAF. If this fails, it try to use the cross platform LAF.
- * If this also fails, the LAF will not be changed.
- */
- private void setLookAndFeel() {
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (RuntimeException t) {
- // Work-around for problems with setting Look and Feel described here:
- // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468089
- Locale.setDefault(Locale.US);
-
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (RuntimeException t2) {
- // For some reason Ubuntu 7 can cause a NullPointerException when trying to getting the LAF
- System.err.println("Could not set the Look and Feel (LAF). The default LAF is used instead");
- }
- }
- // Java 1.6 provide system specific anti-aliasing. Enable it, if it has not been set
- if (new Double(System.getProperty("java.specification.version")) >= 1.6) {
- String aaFontSettings = System.getProperty("awt.useSystemAAFontSettings");
-
- if (aaFontSettings == null) {
- System.setProperty("awt.useSystemAAFontSettings", "on");
- }
- }
- }
-
- public void runIntroBattle() {
- final File intro = new File(FileUtil.getCwd(), "battles/intro.battle");
- if (intro.exists()) {
- battleManager.setBattleFilename(intro.getPath());
- battleManager.loadBattleProperties();
-
- final boolean origShowResults = showResults; // save flag for showing the results
-
- showResults = false;
- try {
- battleManager.startNewBattle(battleManager.loadBattleProperties(), true, false);
- battleManager.setDefaultBattleProperties();
- robocodeFrame.afterIntroBattle();
- } finally {
- showResults = origShowResults; // always restore the original flag for showing the results
- }
- }
- }
-
- public void setVisibleForRobotEngine(boolean visible) {
- if (visible && !isGUIEnabled()) {
- // The GUI must be enabled in order to show the window
- setEnableGUI(true);
-
- // Set the Look and Feel (LAF)
- init();
- }
-
- if (isGUIEnabled()) {
- showRobocodeFrame(visible, false);
- showResults = visible;
- }
- }
-}
diff --git a/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/battle/AwtBattleAdaptor.java b/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/battle/AwtBattleAdaptor.java
deleted file mode 100644
index 11436ae..0000000
--- a/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/battle/AwtBattleAdaptor.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/**
- * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://robocode.sourceforge.net/license/epl-v10.html
- */
-package net.sf.robocode.ui.battle;
-
-
-import net.sf.robocode.battle.IBattleManager;
-import net.sf.robocode.battle.events.BattleEventDispatcher;
-import net.sf.robocode.battle.snapshot.RobotSnapshot;
-import net.sf.robocode.io.Logger;
-import robocode.control.events.*;
-import robocode.control.snapshot.IRobotSnapshot;
-import robocode.control.snapshot.ITurnSnapshot;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.atomic.AtomicInteger;
-
-
-/**
- * @author Pavel Savara (original)
- */
-public final class AwtBattleAdaptor {
- private boolean isEnabled;
- private final IBattleManager battleManager;
- private final BattleEventDispatcher battleEventDispatcher = new BattleEventDispatcher();
- private final BattleObserver observer;
- private final Timer timerTask;
-
- private final AtomicReference snapshot;
- private final AtomicBoolean isRunning;
- private final AtomicBoolean isPaused;
- private final AtomicInteger majorEvent;
- private final AtomicInteger lastMajorEvent;
- private ITurnSnapshot lastSnapshot;
- private StringBuilder[] outCache;
-
- public AwtBattleAdaptor(IBattleManager battleManager, int maxFps, boolean skipSameFrames) {
- this.battleManager = battleManager;
- snapshot = new AtomicReference(null);
-
- this.skipSameFrames = skipSameFrames;
- timerTask = new Timer(1000 / maxFps, new TimerTask());
- isRunning = new AtomicBoolean(false);
- isPaused = new AtomicBoolean(false);
- majorEvent = new AtomicInteger(0);
- lastMajorEvent = new AtomicInteger(0);
-
- observer = new BattleObserver();
- }
-
- protected void finalize() throws Throwable {
- try {
- timerTask.stop();
- battleManager.removeListener(observer);
- } finally {
- super.finalize();
- }
- }
-
- public void subscribe(boolean isEnabled) {
- if (this.isEnabled && !isEnabled) {
- battleManager.removeListener(observer);
- timerTask.stop();
- isEnabled = false;
- } else if (!this.isEnabled && isEnabled) {
- battleManager.addListener(observer);
- isEnabled = true;
- }
- }
-
- public synchronized void addListener(IBattleListener listener) {
- battleEventDispatcher.addListener(listener);
- }
-
- public synchronized void removeListener(IBattleListener listener) {
- battleEventDispatcher.removeListener(listener);
- }
-
- public ITurnSnapshot getLastSnapshot() {
- return lastSnapshot;
- }
-
- // this is always dispatched on AWT thread
- private void awtOnTurnEnded(boolean forceRepaint, boolean readoutText) {
- try {
- ITurnSnapshot current = snapshot.get();
-
- if (current == null) { // !isRunning.get() ||
- // paint logo
- lastSnapshot = null;
- battleEventDispatcher.onTurnEnded(new TurnEndedEvent(null));
- } else {
- if (lastSnapshot != current || !skipSameFrames || forceRepaint) {
- lastSnapshot = current;
-
- IRobotSnapshot[] robots = null;
-
- if (readoutText) {
- synchronized (snapshot) {
- robots = lastSnapshot.getRobots();
-
- for (int i = 0; i < robots.length; i++) {
- RobotSnapshot robot = (RobotSnapshot) robots[i];
-
- final StringBuilder cache = outCache[i];
-
- if (cache.length() > 0) {
- robot.setOutputStreamSnapshot(cache.toString());
- outCache[i].setLength(0);
- }
- }
- }
- }
-
- battleEventDispatcher.onTurnEnded(new TurnEndedEvent(lastSnapshot));
-
- if (readoutText) {
- for (IRobotSnapshot robot : robots) {
- ((RobotSnapshot) robot).setOutputStreamSnapshot(null);
- }
- }
-
- calculateFPS();
- }
- }
- } catch (RuntimeException t) {
- Logger.logError(t);
- }
- }
-
- public int getFPS() {
- return fps;
- }
-
- // FPS (frames per second) calculation
- private int fps;
- private long measuredFrameCounter;
- private long measuredFrameStartTime;
- private final boolean skipSameFrames;
-
- private void calculateFPS() {
- // Calculate the current frames per second (FPS)
-
- if (measuredFrameCounter++ == 0) {
- measuredFrameStartTime = System.nanoTime();
- }
-
- long deltaTime = System.nanoTime() - measuredFrameStartTime;
-
- if (deltaTime / 1000000000 >= 1) {
- fps = (int) (measuredFrameCounter * 1000000000L / deltaTime);
- measuredFrameCounter = 0;
- }
- }
-
- private class TimerTask implements ActionListener {
- public void actionPerformed(ActionEvent e) {
- awtOnTurnEnded(false, true);
- }
- }
-
-
- // BattleObserver methods are always called by battle thread
- // but everything inside invokeLater {} block in on AWT thread
- private class BattleObserver extends BattleAdaptor {
-
- @Override
- public void onTurnEnded(final TurnEndedEvent event) {
- if (lastMajorEvent.get() == majorEvent.get()) {
- // snapshot is updated out of order, but always within the same major event
- snapshot.set(event.getTurnSnapshot());
- }
-
- final IRobotSnapshot[] robots = event.getTurnSnapshot().getRobots();
-
- for (int i = 0; i < robots.length; i++) {
- RobotSnapshot robot = (RobotSnapshot) robots[i];
- final int r = i;
- final String text = robot.getOutputStreamSnapshot();
-
- if (text != null && text.length() != 0) {
- robot.setOutputStreamSnapshot(null);
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- synchronized (snapshot) {
- outCache[r].append(text);
- }
- }
- });
- }
- }
- if (isPaused.get()) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- awtOnTurnEnded(false, true);
- }
- });
- }
- }
-
- @Override
- public void onRoundStarted(final RoundStartedEvent event) {
- if (lastMajorEvent.get() == majorEvent.get()) {
- snapshot.set(event.getStartSnapshot());
- }
- majorEvent.incrementAndGet();
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- awtOnTurnEnded(true, false);
- battleEventDispatcher.onRoundStarted(event);
- lastMajorEvent.incrementAndGet();
- }
- });
- }
-
- @Override
- public void onBattleStarted(final BattleStartedEvent event) {
- majorEvent.incrementAndGet();
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- isRunning.set(true);
- isPaused.set(false);
- synchronized (snapshot) {
- outCache = new StringBuilder[event.getRobotsCount()];
- for (int i = 0; i < event.getRobotsCount(); i++) {
- outCache[i] = new StringBuilder(1024);
- }
- }
- snapshot.set(null);
- battleEventDispatcher.onBattleStarted(event);
- lastMajorEvent.incrementAndGet();
- awtOnTurnEnded(true, false);
- timerTask.start();
- }
- });
- }
-
- @Override
- public void onBattleFinished(final BattleFinishedEvent event) {
- majorEvent.incrementAndGet();
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- isRunning.set(false);
- isPaused.set(false);
- timerTask.stop();
- // flush text cache
- awtOnTurnEnded(true, true);
-
- battleEventDispatcher.onBattleFinished(event);
- lastMajorEvent.incrementAndGet();
- snapshot.set(null);
-
- // paint logo
- awtOnTurnEnded(true, true);
- }
- });
- }
-
- @Override
- public void onBattleCompleted(final BattleCompletedEvent event) {
- majorEvent.incrementAndGet();
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- battleEventDispatcher.onBattleCompleted(event);
- lastMajorEvent.incrementAndGet();
- awtOnTurnEnded(true, true);
- }
- });
- }
-
- @Override
- public void onRoundEnded(final RoundEndedEvent event) {
- majorEvent.incrementAndGet();
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- battleEventDispatcher.onRoundEnded(event);
- lastMajorEvent.incrementAndGet();
- awtOnTurnEnded(true, true);
- }
- });
- }
-
- @Override
- public void onBattlePaused(final BattlePausedEvent event) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- timerTask.stop();
- battleEventDispatcher.onBattlePaused(event);
- awtOnTurnEnded(true, true);
- isPaused.set(true);
- }
- });
- }
-
- @Override
- public void onBattleResumed(final BattleResumedEvent event) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- battleEventDispatcher.onBattleResumed(event);
- if (isRunning.get()) {
- timerTask.start();
- isPaused.set(false);
- }
- }
- });
- }
-
- @Override
- public void onBattleMessage(final BattleMessageEvent event) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- battleEventDispatcher.onBattleMessage(event);
- }
- });
- }
-
- @Override
- public void onBattleError(final BattleErrorEvent event) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- battleEventDispatcher.onBattleError(event);
- }
- });
- }
- }
-}
diff --git a/代码/robocode/robocode.api/target/classes/gl4java/GLFont.class b/代码/robocode/robocode.api/target/classes/gl4java/GLFont.class
deleted file mode 100644
index 2927051..0000000
Binary files a/代码/robocode/robocode.api/target/classes/gl4java/GLFont.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/gl4java/GLFunc.class b/代码/robocode/robocode.api/target/classes/gl4java/GLFunc.class
deleted file mode 100644
index e59a508..0000000
Binary files a/代码/robocode/robocode.api/target/classes/gl4java/GLFunc.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/api/Module.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/api/Module.class
deleted file mode 100644
index 6b01fb7..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/api/Module.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/battle/IBattleManagerBase.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/battle/IBattleManagerBase.class
deleted file mode 100644
index 542addb..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/battle/IBattleManagerBase.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/core/ContainerBase.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/core/ContainerBase.class
deleted file mode 100644
index 47d94b0..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/core/ContainerBase.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/core/IModule.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/core/IModule.class
deleted file mode 100644
index 79a981b..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/core/IModule.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/gui/IWindowManagerBase.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/gui/IWindowManagerBase.class
deleted file mode 100644
index 14e2161..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/gui/IWindowManagerBase.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/io/FileUtil.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/io/FileUtil.class
deleted file mode 100644
index be119ff..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/io/FileUtil.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/io/Logger.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/io/Logger.class
deleted file mode 100644
index 5f54fbe..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/io/Logger.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/io/RobocodeProperties.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/io/RobocodeProperties.class
deleted file mode 100644
index bf77d9e..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/io/RobocodeProperties.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/manager/IVersionManagerBase.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/manager/IVersionManagerBase.class
deleted file mode 100644
index 2b3eeb5..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/manager/IVersionManagerBase.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/peer/IRobotStatics.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/peer/IRobotStatics.class
deleted file mode 100644
index 5fbbc3d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/peer/IRobotStatics.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/repository/CodeSizeCalculator.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/repository/CodeSizeCalculator.class
deleted file mode 100644
index 0b09fae..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/repository/CodeSizeCalculator.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/repository/IRepositoryManagerBase.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/repository/IRepositoryManagerBase.class
deleted file mode 100644
index 09ec41a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/repository/IRepositoryManagerBase.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/HiddenAccess$1.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/HiddenAccess$1.class
deleted file mode 100644
index 2cde5ef..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/HiddenAccess$1.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/HiddenAccess.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/HiddenAccess.class
deleted file mode 100644
index 18fb3a5..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/HiddenAccess.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenBulletHelper.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenBulletHelper.class
deleted file mode 100644
index 241ce7e..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenBulletHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenEventHelper.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenEventHelper.class
deleted file mode 100644
index 3976181..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenEventHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenRulesHelper.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenRulesHelper.class
deleted file mode 100644
index 667c4e3..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenRulesHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenSpecificationHelper.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenSpecificationHelper.class
deleted file mode 100644
index c8ee127..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenSpecificationHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenStatusHelper.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenStatusHelper.class
deleted file mode 100644
index 4299256..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IHiddenStatusHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IThreadManagerBase.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IThreadManagerBase.class
deleted file mode 100644
index e9109ad..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/IThreadManagerBase.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/SafeComponent.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/SafeComponent.class
deleted file mode 100644
index 15fda1a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/security/SafeComponent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/serialization/ISerializableHelper.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/serialization/ISerializableHelper.class
deleted file mode 100644
index e2bd49c..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/serialization/ISerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/serialization/RbSerializer.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/serialization/RbSerializer.class
deleted file mode 100644
index 39d551d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/serialization/RbSerializer.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/util/StringUtil.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/util/StringUtil.class
deleted file mode 100644
index f1e55eb..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/util/StringUtil.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/net/sf/robocode/util/UrlUtil.class b/代码/robocode/robocode.api/target/classes/net/sf/robocode/util/UrlUtil.class
deleted file mode 100644
index 4019458..0000000
Binary files a/代码/robocode/robocode.api/target/classes/net/sf/robocode/util/UrlUtil.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/AdvancedRobot.class b/代码/robocode/robocode.api/target/classes/robocode/AdvancedRobot.class
deleted file mode 100644
index 7ff0392..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/AdvancedRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BattleEndedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/BattleEndedEvent$SerializableHelper.class
deleted file mode 100644
index 374a773..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BattleEndedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BattleEndedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/BattleEndedEvent.class
deleted file mode 100644
index 6ac49c5..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BattleEndedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BattleResults$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/BattleResults$SerializableHelper.class
deleted file mode 100644
index 3c98b06..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BattleResults$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BattleResults.class b/代码/robocode/robocode.api/target/classes/robocode/BattleResults.class
deleted file mode 100644
index 7973b50..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BattleResults.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BattleRules$HiddenHelper.class b/代码/robocode/robocode.api/target/classes/robocode/BattleRules$HiddenHelper.class
deleted file mode 100644
index b5ad548..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BattleRules$HiddenHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BattleRules.class b/代码/robocode/robocode.api/target/classes/robocode/BattleRules.class
deleted file mode 100644
index 98e3530..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BattleRules.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BorderSentry.class b/代码/robocode/robocode.api/target/classes/robocode/BorderSentry.class
deleted file mode 100644
index 7163542..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BorderSentry.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/Bullet$HiddenBulletHelper.class b/代码/robocode/robocode.api/target/classes/robocode/Bullet$HiddenBulletHelper.class
deleted file mode 100644
index dafe025..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/Bullet$HiddenBulletHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/Bullet.class b/代码/robocode/robocode.api/target/classes/robocode/Bullet.class
deleted file mode 100644
index 6aac088..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/Bullet.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BulletHitBulletEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/BulletHitBulletEvent$SerializableHelper.class
deleted file mode 100644
index 8a28f9c..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BulletHitBulletEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BulletHitBulletEvent.class b/代码/robocode/robocode.api/target/classes/robocode/BulletHitBulletEvent.class
deleted file mode 100644
index ec7427a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BulletHitBulletEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BulletHitEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/BulletHitEvent$SerializableHelper.class
deleted file mode 100644
index 9ce95f3..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BulletHitEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BulletHitEvent.class b/代码/robocode/robocode.api/target/classes/robocode/BulletHitEvent.class
deleted file mode 100644
index abc3dee..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BulletHitEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BulletMissedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/BulletMissedEvent$SerializableHelper.class
deleted file mode 100644
index 4ec395d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BulletMissedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/BulletMissedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/BulletMissedEvent.class
deleted file mode 100644
index 98af0cb..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/BulletMissedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/Condition.class b/代码/robocode/robocode.api/target/classes/robocode/Condition.class
deleted file mode 100644
index 317805f..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/Condition.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/CustomEvent.class b/代码/robocode/robocode.api/target/classes/robocode/CustomEvent.class
deleted file mode 100644
index ef30b37..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/CustomEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/DeathEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/DeathEvent$SerializableHelper.class
deleted file mode 100644
index 35d5229..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/DeathEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/DeathEvent.class b/代码/robocode/robocode.api/target/classes/robocode/DeathEvent.class
deleted file mode 100644
index 539657a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/DeathEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/Droid.class b/代码/robocode/robocode.api/target/classes/robocode/Droid.class
deleted file mode 100644
index 94ab802..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/Droid.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/Event$HiddenEventHelper.class b/代码/robocode/robocode.api/target/classes/robocode/Event$HiddenEventHelper.class
deleted file mode 100644
index b33eab5..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/Event$HiddenEventHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/Event.class b/代码/robocode/robocode.api/target/classes/robocode/Event.class
deleted file mode 100644
index 7b5251b..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/Event.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/GunTurnCompleteCondition.class b/代码/robocode/robocode.api/target/classes/robocode/GunTurnCompleteCondition.class
deleted file mode 100644
index 1ef485b..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/GunTurnCompleteCondition.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/HitByBulletEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/HitByBulletEvent$SerializableHelper.class
deleted file mode 100644
index 1d29569..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/HitByBulletEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/HitByBulletEvent.class b/代码/robocode/robocode.api/target/classes/robocode/HitByBulletEvent.class
deleted file mode 100644
index 3316906..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/HitByBulletEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/HitRobotEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/HitRobotEvent$SerializableHelper.class
deleted file mode 100644
index 264ef7d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/HitRobotEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/HitRobotEvent.class b/代码/robocode/robocode.api/target/classes/robocode/HitRobotEvent.class
deleted file mode 100644
index 6f4a6b6..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/HitRobotEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/HitWallEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/HitWallEvent$SerializableHelper.class
deleted file mode 100644
index 2c68e01..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/HitWallEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/HitWallEvent.class b/代码/robocode/robocode.api/target/classes/robocode/HitWallEvent.class
deleted file mode 100644
index 9270b4c..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/HitWallEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/JuniorRobot$InnerEventHandler.class b/代码/robocode/robocode.api/target/classes/robocode/JuniorRobot$InnerEventHandler.class
deleted file mode 100644
index 123ec56..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/JuniorRobot$InnerEventHandler.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/JuniorRobot.class b/代码/robocode/robocode.api/target/classes/robocode/JuniorRobot.class
deleted file mode 100644
index 009b0b5..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/JuniorRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/KeyEvent.class b/代码/robocode/robocode.api/target/classes/robocode/KeyEvent.class
deleted file mode 100644
index bb417c4..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/KeyEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/KeyPressedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/KeyPressedEvent$SerializableHelper.class
deleted file mode 100644
index 4099bdd..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/KeyPressedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/KeyPressedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/KeyPressedEvent.class
deleted file mode 100644
index b8c294e..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/KeyPressedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/KeyReleasedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/KeyReleasedEvent$SerializableHelper.class
deleted file mode 100644
index 9ddeee9..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/KeyReleasedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/KeyReleasedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/KeyReleasedEvent.class
deleted file mode 100644
index e8c8b70..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/KeyReleasedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/KeyTypedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/KeyTypedEvent$SerializableHelper.class
deleted file mode 100644
index 3f1b4cc..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/KeyTypedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/KeyTypedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/KeyTypedEvent.class
deleted file mode 100644
index afcf105..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/KeyTypedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MessageEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MessageEvent.class
deleted file mode 100644
index 055e5f1..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MessageEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseClickedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/MouseClickedEvent$SerializableHelper.class
deleted file mode 100644
index cb56ef2..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseClickedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseClickedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MouseClickedEvent.class
deleted file mode 100644
index 09a1746..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseClickedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseDraggedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/MouseDraggedEvent$SerializableHelper.class
deleted file mode 100644
index fe60182..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseDraggedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseDraggedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MouseDraggedEvent.class
deleted file mode 100644
index 8dcd75b..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseDraggedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseEnteredEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/MouseEnteredEvent$SerializableHelper.class
deleted file mode 100644
index 353a7c6..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseEnteredEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseEnteredEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MouseEnteredEvent.class
deleted file mode 100644
index 73f706c..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseEnteredEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MouseEvent.class
deleted file mode 100644
index 6fe712f..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseExitedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/MouseExitedEvent$SerializableHelper.class
deleted file mode 100644
index d4cd81b..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseExitedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseExitedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MouseExitedEvent.class
deleted file mode 100644
index 280798d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseExitedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseMovedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/MouseMovedEvent$SerializableHelper.class
deleted file mode 100644
index 0bb4436..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseMovedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseMovedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MouseMovedEvent.class
deleted file mode 100644
index b7bdb58..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseMovedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MousePressedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/MousePressedEvent$SerializableHelper.class
deleted file mode 100644
index aa2d504..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MousePressedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MousePressedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MousePressedEvent.class
deleted file mode 100644
index 84a543a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MousePressedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseReleasedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/MouseReleasedEvent$SerializableHelper.class
deleted file mode 100644
index 0df569a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseReleasedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseReleasedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MouseReleasedEvent.class
deleted file mode 100644
index 3582cf3..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseReleasedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseWheelMovedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/MouseWheelMovedEvent$SerializableHelper.class
deleted file mode 100644
index 50f60e0..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseWheelMovedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MouseWheelMovedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/MouseWheelMovedEvent.class
deleted file mode 100644
index a643d71..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MouseWheelMovedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/MoveCompleteCondition.class b/代码/robocode/robocode.api/target/classes/robocode/MoveCompleteCondition.class
deleted file mode 100644
index 8be7acb..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/MoveCompleteCondition.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/PaintEvent.class b/代码/robocode/robocode.api/target/classes/robocode/PaintEvent.class
deleted file mode 100644
index fdc78c8..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/PaintEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RadarTurnCompleteCondition.class b/代码/robocode/robocode.api/target/classes/robocode/RadarTurnCompleteCondition.class
deleted file mode 100644
index 4cbb110..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RadarTurnCompleteCondition.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RateControlRobot.class b/代码/robocode/robocode.api/target/classes/robocode/RateControlRobot.class
deleted file mode 100644
index 8e26ecd..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RateControlRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/Robocode.class b/代码/robocode/robocode.api/target/classes/robocode/Robocode.class
deleted file mode 100644
index d7ab53d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/Robocode.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RobocodeFileOutputStream.class b/代码/robocode/robocode.api/target/classes/robocode/RobocodeFileOutputStream.class
deleted file mode 100644
index df784b0..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RobocodeFileOutputStream.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RobocodeFileWriter.class b/代码/robocode/robocode.api/target/classes/robocode/RobocodeFileWriter.class
deleted file mode 100644
index 16cff4f..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RobocodeFileWriter.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/Robot.class b/代码/robocode/robocode.api/target/classes/robocode/Robot.class
deleted file mode 100644
index c776141..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/Robot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RobotDeathEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/RobotDeathEvent$SerializableHelper.class
deleted file mode 100644
index 39ce28d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RobotDeathEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RobotDeathEvent.class b/代码/robocode/robocode.api/target/classes/robocode/RobotDeathEvent.class
deleted file mode 100644
index bcd2416..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RobotDeathEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RobotStatus$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/RobotStatus$SerializableHelper.class
deleted file mode 100644
index fc8b594..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RobotStatus$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RobotStatus.class b/代码/robocode/robocode.api/target/classes/robocode/RobotStatus.class
deleted file mode 100644
index 35ecec1..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RobotStatus.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RoundEndedEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/RoundEndedEvent$SerializableHelper.class
deleted file mode 100644
index d4cf1fc..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RoundEndedEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/RoundEndedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/RoundEndedEvent.class
deleted file mode 100644
index bbcec8d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/RoundEndedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/Rules.class b/代码/robocode/robocode.api/target/classes/robocode/Rules.class
deleted file mode 100644
index 147e220..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/Rules.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/ScannedRobotEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/ScannedRobotEvent$SerializableHelper.class
deleted file mode 100644
index 8face45..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/ScannedRobotEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/ScannedRobotEvent.class b/代码/robocode/robocode.api/target/classes/robocode/ScannedRobotEvent.class
deleted file mode 100644
index f34f53d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/ScannedRobotEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/SkippedTurnEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/SkippedTurnEvent$SerializableHelper.class
deleted file mode 100644
index 3e724c6..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/SkippedTurnEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/SkippedTurnEvent.class b/代码/robocode/robocode.api/target/classes/robocode/SkippedTurnEvent.class
deleted file mode 100644
index caeb26a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/SkippedTurnEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/StatusEvent.class b/代码/robocode/robocode.api/target/classes/robocode/StatusEvent.class
deleted file mode 100644
index b410504..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/StatusEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/TeamRobot.class b/代码/robocode/robocode.api/target/classes/robocode/TeamRobot.class
deleted file mode 100644
index 049126a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/TeamRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/TurnCompleteCondition.class b/代码/robocode/robocode.api/target/classes/robocode/TurnCompleteCondition.class
deleted file mode 100644
index 03194e3..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/TurnCompleteCondition.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/WinEvent$SerializableHelper.class b/代码/robocode/robocode.api/target/classes/robocode/WinEvent$SerializableHelper.class
deleted file mode 100644
index 9156b4a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/WinEvent$SerializableHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/WinEvent.class b/代码/robocode/robocode.api/target/classes/robocode/WinEvent.class
deleted file mode 100644
index 115d149..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/WinEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/_AdvancedRadiansRobot.class b/代码/robocode/robocode.api/target/classes/robocode/_AdvancedRadiansRobot.class
deleted file mode 100644
index 2e4579b..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/_AdvancedRadiansRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/_AdvancedRobot.class b/代码/robocode/robocode.api/target/classes/robocode/_AdvancedRobot.class
deleted file mode 100644
index e602363..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/_AdvancedRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/_Robot.class b/代码/robocode/robocode.api/target/classes/robocode/_Robot.class
deleted file mode 100644
index 51d3654..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/_Robot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/_RobotBase.class b/代码/robocode/robocode.api/target/classes/robocode/_RobotBase.class
deleted file mode 100644
index dacbbd0..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/_RobotBase.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/annotation/SafeStatic.class b/代码/robocode/robocode.api/target/classes/robocode/annotation/SafeStatic.class
deleted file mode 100644
index f7869f9..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/annotation/SafeStatic.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/annotation/package-info.class b/代码/robocode/robocode.api/target/classes/robocode/annotation/package-info.class
deleted file mode 100644
index 943a46e..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/annotation/package-info.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/BattleSpecification.class b/代码/robocode/robocode.api/target/classes/robocode/control/BattleSpecification.class
deleted file mode 100644
index 4b9e748..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/BattleSpecification.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/BattlefieldSpecification.class b/代码/robocode/robocode.api/target/classes/robocode/control/BattlefieldSpecification.class
deleted file mode 100644
index 78912c6..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/BattlefieldSpecification.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/IRobocodeEngine.class b/代码/robocode/robocode.api/target/classes/robocode/control/IRobocodeEngine.class
deleted file mode 100644
index 366eff2..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/IRobocodeEngine.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/RandomFactory.class b/代码/robocode/robocode.api/target/classes/robocode/control/RandomFactory.class
deleted file mode 100644
index 5a36457..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/RandomFactory.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/RobocodeEngine$BattleObserver.class b/代码/robocode/robocode.api/target/classes/robocode/control/RobocodeEngine$BattleObserver.class
deleted file mode 100644
index aebb7cd..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/RobocodeEngine$BattleObserver.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/RobocodeEngine.class b/代码/robocode/robocode.api/target/classes/robocode/control/RobocodeEngine.class
deleted file mode 100644
index d8164ba..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/RobocodeEngine.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/RobocodeListener.class b/代码/robocode/robocode.api/target/classes/robocode/control/RobocodeListener.class
deleted file mode 100644
index 919f52c..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/RobocodeListener.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/RobotResults.class b/代码/robocode/robocode.api/target/classes/robocode/control/RobotResults.class
deleted file mode 100644
index f32b7f6..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/RobotResults.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/RobotSetup.class b/代码/robocode/robocode.api/target/classes/robocode/control/RobotSetup.class
deleted file mode 100644
index 6e1c29d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/RobotSetup.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/RobotSpecification$HiddenHelper.class b/代码/robocode/robocode.api/target/classes/robocode/control/RobotSpecification$HiddenHelper.class
deleted file mode 100644
index e5cd967..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/RobotSpecification$HiddenHelper.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/RobotSpecification.class b/代码/robocode/robocode.api/target/classes/robocode/control/RobotSpecification.class
deleted file mode 100644
index 64f73ca..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/RobotSpecification.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleAdaptor.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleAdaptor.class
deleted file mode 100644
index 2b9d4d6..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleAdaptor.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleCompletedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleCompletedEvent.class
deleted file mode 100644
index 5633ec3..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleCompletedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleErrorEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleErrorEvent.class
deleted file mode 100644
index 04a18d9..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleErrorEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleEvent.class
deleted file mode 100644
index 52ce504..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleFinishedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleFinishedEvent.class
deleted file mode 100644
index 2841173..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleFinishedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleMessageEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleMessageEvent.class
deleted file mode 100644
index ba32341..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleMessageEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattlePausedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/BattlePausedEvent.class
deleted file mode 100644
index ad96549..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattlePausedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleResumedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleResumedEvent.class
deleted file mode 100644
index 82dfb6b..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleResumedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleStartedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleStartedEvent.class
deleted file mode 100644
index bcf3f65..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/BattleStartedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/IBattleListener.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/IBattleListener.class
deleted file mode 100644
index b8fc7a1..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/IBattleListener.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/RoundEndedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/RoundEndedEvent.class
deleted file mode 100644
index cc4d3df..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/RoundEndedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/RoundStartedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/RoundStartedEvent.class
deleted file mode 100644
index b44c584..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/RoundStartedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/TurnEndedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/TurnEndedEvent.class
deleted file mode 100644
index ba1fb4c..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/TurnEndedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/TurnStartedEvent.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/TurnStartedEvent.class
deleted file mode 100644
index 9304564..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/TurnStartedEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/events/package-info.class b/代码/robocode/robocode.api/target/classes/robocode/control/events/package-info.class
deleted file mode 100644
index 6412e70..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/events/package-info.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/package-info.class b/代码/robocode/robocode.api/target/classes/robocode/control/package-info.class
deleted file mode 100644
index 7574049..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/package-info.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/BulletState.class b/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/BulletState.class
deleted file mode 100644
index 990cdb3..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/BulletState.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IBulletSnapshot.class b/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IBulletSnapshot.class
deleted file mode 100644
index 09c3af1..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IBulletSnapshot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IDebugProperty.class b/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IDebugProperty.class
deleted file mode 100644
index dd6c927..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IDebugProperty.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IRobotSnapshot.class b/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IRobotSnapshot.class
deleted file mode 100644
index 2d12b02..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IRobotSnapshot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IScoreSnapshot.class b/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IScoreSnapshot.class
deleted file mode 100644
index 456af92..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/IScoreSnapshot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/ITurnSnapshot.class b/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/ITurnSnapshot.class
deleted file mode 100644
index 0df0e86..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/ITurnSnapshot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/RobotState.class b/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/RobotState.class
deleted file mode 100644
index 90a76ac..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/RobotState.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/package-info.class b/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/package-info.class
deleted file mode 100644
index 1826596..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/control/snapshot/package-info.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/exception/AbortedException.class b/代码/robocode/robocode.api/target/classes/robocode/exception/AbortedException.class
deleted file mode 100644
index b08e111..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/exception/AbortedException.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/exception/DeathException.class b/代码/robocode/robocode.api/target/classes/robocode/exception/DeathException.class
deleted file mode 100644
index 6c7342b..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/exception/DeathException.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/exception/DisabledException.class b/代码/robocode/robocode.api/target/classes/robocode/exception/DisabledException.class
deleted file mode 100644
index 56cf289..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/exception/DisabledException.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/exception/EventInterruptedException.class b/代码/robocode/robocode.api/target/classes/robocode/exception/EventInterruptedException.class
deleted file mode 100644
index 0feed93..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/exception/EventInterruptedException.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/exception/RobotException.class b/代码/robocode/robocode.api/target/classes/robocode/exception/RobotException.class
deleted file mode 100644
index 368ae28..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/exception/RobotException.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/exception/WinException.class b/代码/robocode/robocode.api/target/classes/robocode/exception/WinException.class
deleted file mode 100644
index 9f69152..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/exception/WinException.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/exception/package-info.class b/代码/robocode/robocode.api/target/classes/robocode/exception/package-info.class
deleted file mode 100644
index 6ce8639..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/exception/package-info.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/package-info.class b/代码/robocode/robocode.api/target/classes/robocode/package-info.class
deleted file mode 100644
index 05e7daa..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/package-info.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/EllipseGL.class b/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/EllipseGL.class
deleted file mode 100644
index c62660d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/EllipseGL.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/LabelGL.class b/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/LabelGL.class
deleted file mode 100644
index 1708174..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/LabelGL.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/LineGL.class b/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/LineGL.class
deleted file mode 100644
index ab2d88b..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/LineGL.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/PointGL.class b/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/PointGL.class
deleted file mode 100644
index 4f9bbd1..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/PointGL.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/RectangleGL.class b/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/RectangleGL.class
deleted file mode 100644
index b03b095..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/RectangleGL.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/RenderElement.class b/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/RenderElement.class
deleted file mode 100644
index 793dca0..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/RenderElement.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/system/GLRenderer.class b/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/system/GLRenderer.class
deleted file mode 100644
index a0c794a..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robocodeGL/system/GLRenderer.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IAdvancedEvents.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IAdvancedEvents.class
deleted file mode 100644
index 95d66c9..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IAdvancedEvents.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IAdvancedRobot.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IAdvancedRobot.class
deleted file mode 100644
index 25e6131..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IAdvancedRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicEvents.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicEvents.class
deleted file mode 100644
index ec7ee74..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicEvents.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicEvents2.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicEvents2.class
deleted file mode 100644
index c1b0119..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicEvents2.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicEvents3.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicEvents3.class
deleted file mode 100644
index 571c2dc..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicEvents3.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicRobot.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicRobot.class
deleted file mode 100644
index c408531..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IBasicRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IInteractiveEvents.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IInteractiveEvents.class
deleted file mode 100644
index 6583b27..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IInteractiveEvents.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IInteractiveRobot.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IInteractiveRobot.class
deleted file mode 100644
index 8376012..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IInteractiveRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IJuniorRobot.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IJuniorRobot.class
deleted file mode 100644
index f3e4d18..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IJuniorRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IPaintEvents.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IPaintEvents.class
deleted file mode 100644
index 5b949df..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IPaintEvents.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IPaintRobot.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IPaintRobot.class
deleted file mode 100644
index 1942dc4..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/IPaintRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/ITeamEvents.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/ITeamEvents.class
deleted file mode 100644
index 17ba440..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/ITeamEvents.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/ITeamRobot.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/ITeamRobot.class
deleted file mode 100644
index d244175..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/ITeamRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/package-info.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/package-info.class
deleted file mode 100644
index cb041d7..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/package-info.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IAdvancedRobotPeer.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IAdvancedRobotPeer.class
deleted file mode 100644
index db645cd..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IAdvancedRobotPeer.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IBasicRobotPeer.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IBasicRobotPeer.class
deleted file mode 100644
index 25be59d..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IBasicRobotPeer.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IJuniorRobotPeer.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IJuniorRobotPeer.class
deleted file mode 100644
index 4b4f805..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IJuniorRobotPeer.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IStandardRobotPeer.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IStandardRobotPeer.class
deleted file mode 100644
index 7f0c225..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/IStandardRobotPeer.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/ITeamRobotPeer.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/ITeamRobotPeer.class
deleted file mode 100644
index 4dfc1b6..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/ITeamRobotPeer.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/package-info.class b/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/package-info.class
deleted file mode 100644
index a0bd3ec..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/robotinterfaces/peer/package-info.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/util/Utils.class b/代码/robocode/robocode.api/target/classes/robocode/util/Utils.class
deleted file mode 100644
index f5c5169..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/util/Utils.class and /dev/null differ
diff --git a/代码/robocode/robocode.api/target/classes/robocode/util/package-info.class b/代码/robocode/robocode.api/target/classes/robocode/util/package-info.class
deleted file mode 100644
index 16ea4d0..0000000
Binary files a/代码/robocode/robocode.api/target/classes/robocode/util/package-info.class and /dev/null differ
diff --git a/代码/robocode/robocode.content/target/classes/ReadMe.html b/代码/robocode/robocode.content/target/classes/ReadMe.html
deleted file mode 100644
index 347ead6..0000000
--- a/代码/robocode/robocode.content/target/classes/ReadMe.html
+++ /dev/null
@@ -1,233 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-ReadMe for Robocode
-Updated 06-Mar-2013 by Flemming N. Larsen
-Robocode Home Page: http://robocode.sourceforge.net/
-TABLE OF CONTENTS
-
-- What is Robocode?
-- History of Robocode
-- System Requirements
-- Getting Started
-- Robocode API
-- Robocode Repository
-- Community
-- Challenges
-- Competition
-- Command Line
-- Links
-- Reporting Defects
-- Feature Requests
-- Versions
-- News
-- How to contribute
-
-1. WHAT IS ROBOCODE?
-Robocode is a programming game where the goal is to code a robot battle tank to compete against other robots in a battle arena. So the name Robocode is a short for "Robot code". The player is the programmer of the robot, who will have no direct influence on the game. Instead, the player must write the AI of the robot telling it how to behave and react on events occurring in the battle arena. Battles are running in real-time and on-screen.
-The motto of Robocode is: Build the best, destroy the rest!
-Besides being a programming game, Robocode is used for learning how to program, primarily in the Java language, but other languages like C# and Scala are becoming popular as well.
-Schools and universities are using Robocode as part of teaching how to program, but also for studying artificial intelligence (AI). The concept of Robocode is easy to understand, and a fun way to learn how to program.
-Robocode offers complete development environment, and comes with its own installer, built-in robot editor and Java compiler. Robocode only pre-requires that a JVM (Java Virtual Machine) to exist already on the system where Robocode is going to be installed. Hence, everything a robot developer needs to get started is provided with the main Robocode distribution file (robocode-xxx-setup.jar
). Robocode also supports developing robots using external IDEs like e.g. Eclipse, IntelliJ IDEA, NetBeans, Visual Studio etc., which supports the developer much better than the robot editor in Robocode.
-The fact that Robocode runs on the Java platform makes it possible to run it on any operating system with Java pre-installed, meaning that it will be able to run on Windows, Linux, Mac OS, but also UNIX and variants of UNIX. Note that Java 6 or newer must be installed on the system before Robocode is able to run. See the System Requirements for more information.
-Be aware that many users of Robocode (aka Robocoders) find Robocode to be very fun, but also very addictive. :-)
-Robocode comes free of charge and is being developed as a spare-time project where no money is involved. The developers of Robocode are developing on Robocode because they think it is fun, and because they improve themselves as developers this way.
-Robocode is an Open Source project, which means that all sources are open to everybody. In addition, Robocode is provided under the terms of EPL (Eclipse Public License).
-2. HISTORY OF ROBOCODE
-The Robocode game was originally started by Mathew A. Nelson as a personal endeavor in late 2000 and became a professional one when he brought it to IBM, in the form of an AlphaWorks download, in July 2001.
-IBM was interested in Robocode, as they saw an opportunity to promote Robocode as a fun way to get started with learning how to program in Java. IBM wrote lots of articles about Robocode, e.g. like Rock 'em, sock 'em Robocode! from AlphaWorks / developerWorks at IBM, a series of articles like Secrets from the Robocode masters, and "Robocode Rumble / RoboLeague".
-The inspiration for creating Robocode came from Robot Battle, a programming game written by Brad Schick in 1992, which should still be alive. Robot Battle was, in turn, inspired by RobotWar, an Apple II+ game from the early 1980s.
-The articles from IBM and the Robocode community behind the RoboWiki made Robocode very popular as programming game, and for many years Robocode has been used for education and research at schools and universities all over the world.
-In the beginning of 2005, Mathew convinced IBM to release Robocode as Open Source on SourceForge. At this point, the development of Robocode had somewhat stopped. The community around Robocode began to develop their own versions of Robocode with bug fixes and new features, e.g. the OpenSourceRobocode/Contributions and later on the two projects, RobocodeNG and Robocode 2006, by Flemming N. Larsen.
-Eventually, Flemming took over the Robocode project at SourceForge as administrator and developer in July 2006 to continue the original Robocode game. The RobocodeNG project was dropped, but Robocode 2006 was merged into the official Robocode version 1.1 containing lots of improvements. Since then, lots of new versions of Robocode have been released with more and more features and contributions from the community.
-In May 2007, the RoboRumble client got built into Robocode. RoboRumble is widely used by the Robocode community for creating up-to-date robot ranking lists for the 1-to-1, Melee, Team, and Twin Dual competitions.
-Since May 2010 a .NET plugin is provided for Robocode using a .NET / Java bridge, which makes it possible to develop robots for .NET beside developing robots in Java. This part was made by Pavel Savara, who is a major Robocode contributor.
-3. SYSTEM REQUIREMENTS
-In order to run Robocode, Java 6 Standard Edition (SE) or a newer version of Java must be installed on your system. Both the Java Runtime Environment (JRE) and the Java Developer Kit (JDK) can be used. Note that the JRE does not include the standard Java compiler (javac), but the JDK does. However, Robocode comes with a built-in compiler (ECJ). Hence, it is sufficient running Robocode on the JRE.
-Also note that it is important that these environment variables have been set up prior to running Robocode:
-
-JAVA_HOME
must be setup to point at the home directory for Java (JDK or JRE).
Windows example: JAVA_HOME=C:\Program Files\Java\jdk1.6.0_41
UNIX, Linux, Mac OS example: JAVA_HOME=/usr/local/jdk1.6.0_41
-PATH
must include the path to the bin
of the Java home directory (JAVA_HOME
) that includes java.exe
for starting the Java virtual Machine (JVM).
Windows example: PATH=%PATH%;%JAVA_HOME%
UNIX, Linux, Mac OS example: PATH=${PATH}:${JAVA_HOME}/bin
-
-You can read more details from here:
-
-If you want to program robots in .NET or control Robocode from a .NET application, you need to install the Robocode .NET API plug-in on top of Robocode. The plug-in is installed by double-clicking the robocode.dotnet-xxx-setup.jar
the same way as Robocode itself is installed.
-4. GETTING STARTED
-Most documentation about Robocode is provided thru the RoboWiki, which contains the official documentation about Robocode, but which also hosts the community around Robocode. It is highly recommended to read the articles on the RoboWiki for getting started with Robocode. These articles are provided from here:
-
-You should read about the anatomy of a robot, the game physics, scoring etc.
-To learn more about developing robots for .NET, these articles are a good starting point:
-
-5. ROBOCODE API
-The Robocode API is provided as HTML pages for both the Java and .NET platform.
-
-The Robocode API actually consists of 3 different APIs.
-
-Robot API: Within the Java package robocode
and .NET namespace Robocode
.
The Robot API is used for developing robots, and is the only part of the API that robots are allowed to access.
-Robot Interfaces: Within the Java package robocode.robotinterfaces
and .NET namespace Robocode.RobotInterfaces
.
The Robot Interfaces are used for developing new robot types with a different API that the standard Robot API.
Note: The game rules and robot behaviors cannot be changed.
-Control API: Within the Java package robocode.control
and .NET namespace Robocode.Control
.
The Control API is used for letting another application start up battles with selected robots in Robocode and retrieve the results. It is also possible to get snapshots of robots and bullets (like position, heading, energy level etc.) at a specific time in a battle.
-
-6. ROBOCODE REPOSITORY
-If you want to try out new robots than the sample robots that come with Robocode, you should visit the Robocode Repository.
-Robots are available under the Bots section of the repository.
-The Robocode Repository is developed and maintained by David Lynn as a project independently of the Robocode project.
-
-The community around Robocode is using the RoboWiki as communication channel. At the RoboWiki, people share new ideas, code snippets, algorithms, strategies, and lots of other stuff about Robocode. New official documentation from the developers of Robocode will be put at the RoboWiki as well.
-On the RoboWiki, these strategies are provided:
-
-The code snippets are also provided on the RoboWiki:
-
-8. CHALLENGES
-A good way to improve you self as a robot developer is to try out some real challenges. On the RoboWiki, two famous challenges exist for testing/studying a robots movement, targeting, and gun abilities:
-
-9. COMPETITION
-If you want to challenge your robot(s) and yourself as robot developer, the RoboRumble@Home is the best way to do it. RoboRumble is the ultimate collaborative effort to have a live, up-to-date ranking of Robocode bots. It uses the power of available Robocoders' computers to distribute the effort of running battles and building the rankings.
-RoboRumble is actually 3 different rumbles:
-
-- RoboRumble (aka 1v1): One robot versus another robot - both picked at random. These two robots a alone on the battle field.
-- MeleeRumble: Ten robots picked at random all battle against each other..
-- TeamRumble: One team versus another team - both picked at random. Each team consists of five or less robots.
-
-In order to get started with RoboRumble, you should read this page:
-
-Note that the RoboRumble@Home client is built into Robocode and can be started using the batch/shell/command files:
-
-
-
-
-
-
-RoboRumble |
-roborumble.bat |
-roborumble.sh |
-roborumble.command |
-
-
-MeleeRumble |
-meleerumble.bat |
-meleerumble.sh |
-meleerumble.command |
-
-
-TeamRumble |
-teamrumble.bat |
-teamrumble.sh |
-teamrumble.command |
-
-
-
-Two other competitions exists which are:
-
-- Twin Duel: Two teams battle on an 800x800 field. Each team consists of two robots (twins).
-- Hat League: Two teams not knowing each other are paired together at random (like drawing names from a hat). Each team consists of two robots. These two teams must work together and defeat two other teams that have also been picked at random.
-
-10. COMMAND LINE
-It is possible to specify options and predefined properties from the command-line when running Robocode. The usage of these can be listed by writing this from a command prompt or shell:
-robocode -help
-For example, it is possible to:
-
-- disable the graphical user interface (GUI).
-- disable security that is specific to Robocode (but does not override the security that comes with the JVM).
-- enable/disable the debugging mode, useful when debugging robots.
-- play a battle based on an existing Robocode .battle file.
-- replay a recorded battle visually.
-- save the results of battles in a comma-separated file.
-
-You can read more details here:
-
-11. LINKS
-Links relevant to Robocode are provided on the home page of Robocode:
-
-Other links are provided from the RoboWiki - especially for challenges and competitions:
-
-The is also a Wikipedia page available about Robocode, which provides good links to movement and targeting strategies, competitions, and other sites about Robocode:
-
-12. REPORTING DEFECTS
-If you discover a defect (bug) in Robocode you are encouraged to report the issue as soon as you discover it - the sooner the better.
-A bug report should be reported on the Bugs page on the SourceForge site for Robocode. Each bug report will be prioritized among other bug reports depending on its impact on the game.
-It will be a great help if you describe how to see or which steps to do in order to reproduce the defect. You are very welcome to provide a screen shot, source code or anything else that will show the bug. It is also a very good idea to write which system and version of Robocode and Java you are using.
-If you are a registered user at SourceForge (register here) you will be able to add a "monitor" on your bug report. This way you will be able to receive notifications when someone add comments to your report, but will also be able to better track the current status of the bug, e.g. when the bug is fixed and with which version of Robocode the fix is available.
-If you are a developer yourself, and have a good idea of how the bug could be fixed, you are more than welcome to do so. By fixing the bug, you will become a contributor of Robocode yourself. You can learn more about how to contribute here. Note that we accept bug fixes under the terms of EPL.
-13. FEATURE REQUESTS
-If you got an idea for a new feature or improvement for Robocode, you are very welcome to share your idea by summiting a feature request.
-A feature request should be put on the Feature Requests on the SourceForge site for Robocode. Each feature request will be prioritized among other feature requests.
-It will be a great help if you describe your idea in detail, and how you think it could be implemented into Robocode. For example, will it be possible to extend an existing feature with your idea?
-If you are a registered user at SourceForge (register here) you will be able to add a "monitor" on your request. This way you will be able to receive notifications when someone add comments to your request entry, but will also be able to better track the current status of your entry, e.g. when the feature has been implemented and with which version of Robocode it will be available.
-If you are a developer yourself, and have a good idea of how the feature could be implemented, you are more than welcome to do so if the feature is being accepted. By implementing the feature, you will become a contributor of Robocode yourself. You can learn more about how to contribute here. Note that we accept implementations under the terms of EPL.
-14. VERSIONS
-Robocode is continuously under development, and you should be aware that three different release types exist for Robocode:
-
-Alpha version is an unofficial "snapshot" version of Robocode that is under development and not feature complete yet. It is normally provided for the person that has put a bug report or feature request on the tracker for Robocode, which needs to be verified. Alpha versions are not meant to be redistributed at all.
-Beta version is an official release that is considered feature complete, and which intended for everybody to try out and test regarding all new features and changes, but which is also considered "unstable", and might contain some unwanted side-effects due to the changes made to this version compared to the last final version of Robocode. Defects or undesired behaviors should be reported as soon as they are discovered so the issues can be fixed before the final release. Everybody is encouraged to take part in the testing Beta versions of Robocode.
-Final version is (as it says) the final version of a specific and official release of Robocode, and where new features and bug fixes have been tested. Note, that the release will not state "final" on the distribution files for Robocode like it is the case for Alpha and Beta versions.
-
-15. NEWS
-News about Robocode is put on the blog spot for Robocode. Here it is possible subscribe to a RSS feed to receive news about Robocode.
-
-You can also follow Robocode on Twitter and Facebook here:
-
-The RoboWiki can be followed on Twitter as well:
-
-16. HOW TO CONTRIBUTE
-If you want to contribute to Robocode with e.g. a new feature or bug fix, you should read the Developers Guide for building Robocode.
-Note that we accept code changes under the terms of EPL.
-There exist no or little documentation about the internals of Robocode, and the code base will need to be examined by a contributor in order to get an insight of how Robocode is implemented. Thus, it required a skilled Java developer to figure out how Robocode is put together.
-Robocode is divided into several modules. You can read Pavel Savara's blog to get a good overview of Robocode here:
-
-Help for Robocode internals can be provided through the Robocode Developers Discussion Group where you can register yourself, and start up a new topic. This is the best way of getting information and asking about details for the internals in Robocode.
-If a contribution is a somewhat small change to involves under 10 files, then the preferred way is to provide the contribution as a patch file that can be applied to the existing Robocode sources. Otherwise, you can be granted a Subversion branch for your work, where you can commit your changes. Later, this branch needs to be merged into the trunk be the administrators of Robocode and tested carefully. Additional work might be done by other Robocode developers to finalize the work.
-
-
diff --git a/代码/robocode/robocode.content/target/classes/ReadMe.txt b/代码/robocode/robocode.content/target/classes/ReadMe.txt
deleted file mode 100644
index 1fe94cc..0000000
--- a/代码/robocode/robocode.content/target/classes/ReadMe.txt
+++ /dev/null
@@ -1,471 +0,0 @@
-## ReadMe for Robocode
-
-Updated 06-Mar-2013 by Flemming N. Larsen
-
-Robocode Home Page:
-[http://robocode.sourceforge.net/](http://robocode.sourceforge.net/)
-
-### TABLE OF CONTENTS
-
-1. [What is Robocode?](#what-is-robocode)
-2. [History of Robocode](#history-of-robocode)
-3. [System Requirements](#system-requirements)
-4. [Getting Started](#getting-started)
-5. [Robocode API](#robocode-api)
-6. [Robocode Repository](#robocode-repository)
-7. [Community](#community)
-8. [Challenges](#challenges)
-9. [Competition](#competition)
-10. [Command Line](#command-line)
-11. [Links](#links)
-12. [Reporting Defects](#reporting-defects)
-13. [Feature Requests](#feature-requests)
-14. [Versions](#versions)
-15. [News](#news)
-16. [How to contribute](#how-to-contribute)
-
-### 1. WHAT IS ROBOCODE?
-
-Robocode is a programming game where the goal is to code a robot battle
-tank to compete against other robots in a battle arena. So the name
-Robocode is a short for "Robot code". The player is the programmer of
-the robot, who will have no direct influence on the game. Instead, the
-player must write the AI of the robot telling it how to behave and
-react on events occurring in the battle arena. Battles are running in
-real-time and on-screen.
-
-**The motto of Robocode is: Build the best, destroy the rest!**
-
-Besides being a programming game, Robocode is used for learning how to
-program, primarily in the Java language, but other languages like C#
-and Scala are becoming popular as well.
-
-Schools and universities are using Robocode as part of teaching how to
-program, but also for studying artificial intelligence (AI). The
-concept of Robocode is easy to understand, and a fun way to learn how
-to program.
-
-Robocode offers complete development environment, and comes with its
-own installer, built-in robot editor and Java compiler. Robocode only
-pre-requires that a JVM (Java Virtual Machine) to exist already on the
-system where Robocode is going to be installed. Hence, everything a
-robot developer needs to get started is provided with the main Robocode
-distribution file (`robocode-xxx-setup.jar`). Robocode also supports
-developing robots using external IDEs like e.g.
-[Eclipse](http://www.eclipse.org/downloads/),
-[IntelliJ IDEA](http://www.jetbrains.com/idea/),
-[NetBeans](http://netbeans.org/),
-[Visual Studio](http://msdn.microsoft.com/en-gb/vstudio/) etc., which
-supports the developer much better than the robot editor in Robocode.
-
-The fact that Robocode runs on the Java platform makes it possible to
-run it on any operating system with Java pre-installed, meaning that it
-will be able to run on Windows, Linux, Mac OS, but also UNIX and
-variants of UNIX. Note that Java 6 or newer must be installed on the
-system before Robocode is able to run. See the [System
-Requirements](#system-requirements) for more information.
-
-Be aware that many users of Robocode (aka Robocoders) find Robocode to
-be very fun, but also very addictive. :-)
-
-Robocode comes free of charge and is being developed as a spare-time
-project where no money is involved. The developers of Robocode are
-developing on Robocode because they think it is fun, and because they
-improve themselves as developers this way.
-
-Robocode is an Open Source project, which means that all sources are
-open to everybody. In addition, Robocode is provided under the terms of
-[EPL](http://www.eclipse.org/legal/epl-v10.html) (Eclipse Public
-License).
-
-### 2. HISTORY OF ROBOCODE
-
-The Robocode game was originally started by **Mathew A. Nelson** as a
-personal endeavor in late 2000 and became a professional one when he
-brought it to IBM, in the form of an AlphaWorks download, in July 2001.
-
-IBM was interested in Robocode, as they saw an opportunity to promote
-Robocode as a fun way to get started with learning how to program in
-Java. IBM wrote lots of articles about Robocode, e.g. like
-[Rock 'em, sock 'em Robocode!](http://www.ibm.com/developerworks/java/library/j-robocode/)
-from AlphaWorks / developerWorks at IBM, a series of articles like
-[Secrets from the Robocode masters](http://www.ibm.com/developerworks/java/library/j-robotips/),
-and "Robocode Rumble / RoboLeague".
-
-The inspiration for creating Robocode came from
-[Robot Battle](http://www.robotbattle.com/history.php), a programming
-game written by Brad Schick in 1992, which should still be alive. Robot
-Battle was, in turn, inspired by
-[RobotWar](http://www.robotbattle.com/history.php), an Apple II+ game
-from the early 1980s.
-
-The articles from IBM and the Robocode community behind the RoboWiki made
-Robocode very popular as programming game, and for many years Robocode has been
-used for education and research at schools and universities all over the world.
-
-In the beginning of 2005, Mathew convinced IBM to release Robocode as
-**Open Source** on SourceForge. At this point, the development of Robocode had
-somewhat stopped. The community around Robocode began to develop their own
-versions of Robocode with bug fixes and new features, e.g. the
-[OpenSourceRobocode/Contributions](http://old.robowiki.net/robowiki?OpenSourceRobocode/Contributions)
-and later on the two projects,
-[RobocodeNG and Robocode 2006](http://old.robowiki.net/robowiki?RobocodeNG/Archive), by **Flemming N. Larsen**.
-
-Eventually, Flemming took over the Robocode project at SourceForge as
-administrator and developer in July 2006 to continue the original Robocode game.
-The RobocodeNG project was dropped, but Robocode 2006 was merged into the
-official Robocode version 1.1 containing lots of improvements. Since then,
-lots of new versions of Robocode have been released with more and more features
-and contributions from the community.
-
-In May 2007, the [RoboRumble](http://robowiki.net/wiki/RoboRumble) client got
-built into Robocode. RoboRumble is widely used by the Robocode community for
-creating up-to-date robot ranking lists for the 1-to-1, Melee, Team, and
-Twin Dual competitions.
-
-Since May 2010 a **.NET plugin** is provided for Robocode using a .NET / Java
-bridge, which makes it possible to develop robots for .NET beside developing
-robots in Java. This part was made by **Pavel Savara**, who is a major Robocode
-contributor.
-
-### 3. SYSTEM REQUIREMENTS
-
-In order to run Robocode, Java 6 Standard Edition (SE) or a newer
-version of Java must be installed on your system. Both the Java Runtime
-Environment (JRE) and the Java Developer Kit (JDK) can be used. Note
-that the JRE does not include the standard Java compiler (javac), but
-the JDK does. However, Robocode comes with a built-in compiler (ECJ).
-Hence, it is sufficient running Robocode on the JRE.
-
-Also note that it is important that these environment variables have
-been set up prior to running Robocode:
-
-- `JAVA_HOME` must be setup to point at the home directory for Java
- (JDK or JRE).
- Windows example: `JAVA_HOME=C:\Program Files\Java\jdk1.6.0_41`
- UNIX, Linux, Mac OS example: `JAVA_HOME=/usr/local/jdk1.6.0_41`
-
-- `PATH` must include the path to the `bin` of the Java home
- directory (`JAVA_HOME`) that includes `java.exe` for starting the
- Java virtual Machine (JVM).
- Windows example: `PATH=%PATH%;%JAVA_HOME%`
- UNIX, Linux, Mac OS example: `PATH=${PATH}:${JAVA_HOME}/bin`
-
-You can read more details from here:
-
-- [System Requirements](http://robowiki.net/wiki/Robocode/System_Requirements)
-
-If you want to program robots in .NET or control Robocode from a .NET
-application, you need to install the Robocode .NET API plug-in on top of
-Robocode. The plug-in is installed by double-clicking the
-`robocode.dotnet-xxx-setup.jar` the same way as Robocode itself is
-installed.
-
-### 4. GETTING STARTED
-
-Most documentation about Robocode is provided thru the
-[RoboWiki](http://robowiki.net), which contains the official
-documentation about Robocode, but which also hosts the community around
-Robocode. It is highly recommended to read the articles on the RoboWiki
-for getting started with Robocode. These articles are provided from
-here:
-
-- [Getting Started](http://robowiki.net/wiki/Robocode/Getting_Started)
-
-You should read about the anatomy of a robot, the game physics, scoring
-etc.
-
-To learn more about developing robots for .NET, these articles are a
-good starting point:
-
-- [Create a .NET robot with Visual Studio](http://robowiki.net/wiki/Robocode/.NET/Create_a_.NET_robot_with_Visual_Studio)
-- [Debug a .NET robot with Visual Studio](http://robowiki.net/wiki/Robocode/.NET/Debug_a_.NET_robot_in_Visual_Studio)
-
-### 5. ROBOCODE API
-
-The Robocode API is provided as HTML pages for both the Java and .NET
-platform.
-
-- [Java Robot API](http://robocode.sourceforge.net/docs/robocode/)
-- [Java Control API](http://robocode.sourceforge.net/docs/robocode/index.html?robocode/control/package-summary.html)
-- [.NET Robot API](http://robocode.sourceforge.net/docs/robocode.dotnet/Index.html)
-- [.NET Control API](http://robocode.sourceforge.net/docs/robocode.dotnet.control/Index.html)
-
-The Robocode API actually consists of 3 different APIs.
-
-- **Robot API**: Within the Java package `robocode` and .NET namespace
- `Robocode`.
- The Robot API is used for developing robots, and is the only part of
- the API that robots are allowed to access.
-
-- **Robot Interfaces**: Within the Java package
- `robocode.robotinterfaces` and .NET namespace
- `Robocode.RobotInterfaces`.
- The Robot Interfaces are used for developing new robot types with a
- different API that the standard Robot API.
- **Note:** *The game rules and robot behaviors cannot be changed.*
-
-- **Control API**: Within the Java package `robocode.control` and .NET
- namespace `Robocode.Control`.
- The Control API is used for letting another application start up
- battles with selected robots in Robocode and retrieve the results.
- It is also possible to get snapshots of robots and bullets (like
- position, heading, energy level etc.) at a specific time in a battle.
-
-### 6. ROBOCODE REPOSITORY
-
-If you want to try out new robots than the sample robots that come with
-Robocode, you should visit the [Robocode
-Repository](http://robocoderepository.com/).
-
-Robots are available under the
-[Bots](http://robocoderepository.com/Categories.jsp) section of the
-repository.
-
-The Robocode Repository is developed and maintained by David Lynn as a
-project independently of the Robocode project.
-
-### 7. COMMUNITY
-
-The community around Robocode is using the RoboWiki as communication
-channel. At the RoboWiki, people share new ideas, code snippets,
-algorithms, strategies, and lots of other stuff about Robocode. New
-official documentation from the developers of Robocode will be put at
-the RoboWiki as well.
-
-On the RoboWiki, these strategies are provided:
-
-- [Radar](http://robowiki.net/wiki/Radar)
-- [Movement](http://robowiki.net/wiki/Category:Movement)
-- [Targeting](http://robowiki.net/wiki/Category:Targeting)
-
-The code snippets are also provided on the RoboWiki:
-
-- [Code Snippets](http://robowiki.net/wiki/Category:Code_Snippets)
-
-### 8. CHALLENGES
-
-A good way to improve you self as a robot developer is to try out some
-real challenges. On the RoboWiki, two famous challenges exist for
-testing/studying a robots movement, targeting, and gun abilities:
-
-- [Movement Challenge](http://robowiki.net/wiki/Movement_Challenge_(original))
-- [Targeting Challenge](http://robowiki.net/wiki/Targeting_Challenge_(original))
-- [RoboRumble Gun Challenge](hhttp://robowiki.net/wiki/RoboRumble_Gun_Challenge)
-
-### 9. COMPETITION
-
-If you want to challenge your robot(s) and yourself as robot developer,
-the [RoboRumble@Home](http://robowiki.net/wiki/RoboRumble) is the best
-way to do it. RoboRumble is the ultimate collaborative effort to have a
-live, up-to-date ranking of Robocode bots. It uses the power of
-available Robocoders' computers to distribute the effort of running
-battles and building the rankings.
-
-RoboRumble is actually 3 different rumbles:
-
-- **RoboRumble** (aka 1v1): One robot versus another robot - both
- picked at random. These two robots a alone on the battle field.
-- **MeleeRumble**: Ten robots picked at random all battle against
- each other..
-- **TeamRumble**: One team versus another team - both picked at
- random. Each team consists of five or less robots.
-
-In order to get started with RoboRumble, you should read this page:
-
-- [Starting With RoboRumble](http://robowiki.net/wiki/RoboRumble/Starting_With_RoboRumble)
-
-Note that the RoboRumble@Home client is built into Robocode and can
-be started using the batch/shell/command files:
-
-| | Windows | UNIX / Linux | Mac OS |
-|-----------------+-------------------+------------------+-----------------------|
-| **RoboRumble** | `roborumble.bat` | `roborumble.sh` | `roborumble.command` |
-| **MeleeRumble** | `meleerumble.bat` | `meleerumble.sh` | `meleerumble.command` |
-| **TeamRumble** | `teamrumble.bat` | `teamrumble.sh` | `teamrumble.command` |
-
-Two other competitions exists which are:
-
-- [Twin Duel](http://robowiki.net/wiki/Twin_Duel): Two teams
- battle on an 800x800 field. Each team consists of two robots
- (twins).
-- [Hat League](http://robowiki.net/wiki/Hat_League): Two teams not
- knowing each other are paired together at random (like drawing
- names from a hat). Each team consists of two robots. These two
- teams must work together and defeat two other teams that have also
- been picked at random.
-
-### 10. COMMAND LINE
-
-It is possible to specify options and predefined properties from the
-command-line when running Robocode. The usage of these can be listed by
-writing this from a command prompt or shell:
-
- robocode -help
-
-For example, it is possible to:
-
-- disable the graphical user interface (GUI).
-- disable security that is specific to Robocode (but does not
- override the security that comes with the JVM).
-- enable/disable the debugging mode, useful when debugging robots.
-- play a battle based on an existing Robocode .battle file.
-- replay a recorded battle visually.
-- save the results of battles in a comma-separated file.
-
-You can read more details here:
-
-- [Console Usage](http://robowiki.net/w/index.php?title=Robocode/Console_Usage)
-
-### 11. LINKS
-
-Links relevant to Robocode are provided on the home page of Robocode:
-
-- [Home Page of Robocode](http://robocode.sourceforge.net/)
-
-Other links are provided from the RoboWiki - especially for challenges
-and competitions:
-
-- [RoboWiki](http://robowiki.net/)
-
-The is also a Wikipedia page available about Robocode, which provides
-good links to movement and targeting strategies, competitions, and other
-sites about Robocode:
-
-- [Robocode on Wikipedia](http://en.wikipedia.org/wiki/Robocode)
-
-### 12. REPORTING DEFECTS
-
-If you discover a defect (bug) in Robocode you are encouraged to report
-the issue as soon as you discover it - the sooner the better.
-
-A bug report should be reported on the [Bugs](http://http://sourceforge.net/p/robocode/bugs//p/robocode/bugs/)
-page on the SourceForge site for Robocode. Each bug report will be
-prioritized among other bug reports depending on its impact on the game.
-
-It will be a great help if you describe how to see or which steps to do
-in order to reproduce the defect. You are very welcome to provide a
-screen shot, source code or anything else that will show the bug. It is
-also a very good idea to write which system and version of Robocode and
-Java you are using.
-
-If you are a registered user at SourceForge (register
-[here](http://sourceforge.net/account/registration/)) you will be able
-to add a "monitor" on your bug report. This way you will be able to
-receive notifications when someone add comments to your report, but will
-also be able to better track the current status of the bug, e.g. when
-the bug is fixed and with which version of Robocode the fix is
-available.
-
-If you are a developer yourself, and have a good idea of how the bug
-could be fixed, you are more than welcome to do so. By fixing the bug,
-you will become a contributor of Robocode yourself. You can learn more
-about how to contribute [here](#how-to-contribute). Note that we accept
-bug fixes under the terms of
-[EPL](http://www.eclipse.org/legal/epl-v10.html).
-
-### 13. FEATURE REQUESTS
-
-If you got an idea for a new feature or improvement for Robocode, you
-are very welcome to share your idea by summiting a feature request.
-
-A feature request should be put on the
-[Feature Requests](http://sourceforge.net/p/robocode/feature-requests/)
-on the SourceForge site for Robocode. Each feature request will be
-prioritized among other feature requests.
-
-It will be a great help if you describe your idea in detail, and how you
-think it could be implemented into Robocode. For example, will it be
-possible to extend an existing feature with your idea?
-
-If you are a registered user at SourceForge (register
-[here](http://sourceforge.net/account/registration/)) you will be able
-to add a "monitor" on your request. This way you will be able to receive
-notifications when someone add comments to your request entry, but will
-also be able to better track the current status of your entry, e.g. when
-the feature has been implemented and with which version of Robocode it
-will be available.
-
-If you are a developer yourself, and have a good idea of how the feature
-could be implemented, you are more than welcome to do so if the feature
-is being accepted. By implementing the feature, you will become a
-contributor of Robocode yourself. You can learn more about how to
-contribute [here](#how-to-contribute). Note that we accept
-implementations under the terms of
-[EPL](http://www.eclipse.org/legal/epl-v10.html).
-
-### 14. VERSIONS
-
-Robocode is continuously under development, and you should be aware that
-three different release types exist for Robocode:
-
-- **Alpha** version is an unofficial "snapshot" version of Robocode
- that is under development and not feature complete yet. It is
- normally provided for the person that has put a bug report or
- feature request on the tracker for Robocode, which needs to be
- verified. Alpha versions are not meant to be redistributed at all.
-
-- **Beta** version is an official release that is considered feature
- complete, and which intended for everybody to try out and test
- regarding all new features and changes, but which is also
- considered "unstable", and might contain some unwanted side-effects
- due to the changes made to this version compared to the last final
- version of Robocode. Defects or undesired behaviors should be
- reported as soon as they are discovered so the issues can be fixed
- before the final release. Everybody is encouraged to take part in
- the testing Beta versions of Robocode.
-
-- **Final** version is (as it says) the final version of a specific
- and official release of Robocode, and where new features and bug
- fixes have been tested. Note, that the release will not state
- "final" on the distribution files for Robocode like it is the case
- for Alpha and Beta versions.
-
-### 15. NEWS
-
-News about Robocode is put on the blog spot for Robocode. Here it
-is possible subscribe to a RSS feed to receive news about Robocode.
-
-- [Robocode News](http://robo-code.blogspot.com/)
-
-You can also follow Robocode on Twitter and Facebook here:
-
-- [Twitter for Robocode](http://twitter.com/robocode)
-- [Robocode on Facebook](http://www.facebook.com/group.php?gid=129627130234)
-
-The RoboWiki can be followed on Twitter as well:
-
-- [Twitter for RoboRumble](http://twitter.com/robowiki)
-
-### 16. HOW TO CONTRIBUTE
-
-If you want to contribute to Robocode with e.g. a new feature or bug
-fix, you should read the [Developers Guide for building
-Robocode.](http://robowiki.net/wiki/Robocode/Developers_Guide_for_building_Robocode)
-
-Note that we accept code changes under the terms of
-[EPL](http://www.eclipse.org/legal/epl-v10.html).
-
-There exist no or little documentation about the internals of Robocode,
-and the code base will need to be examined by a contributor in order to
-get an insight of how Robocode is implemented. Thus, it required a
-skilled Java developer to figure out how Robocode is put together.
-
-Robocode is divided into several modules. You can read Pavel Savara's
-blog to get a good overview of Robocode here:
-
-- [Robocode modules](http://zamboch.blogspot.com/2009/06/robocode-modules-as-in-version-17.html)
-
-Help for Robocode internals can be provided through the [Robocode
-Developers Discussion Group](https://groups.google.com/forum/?fromgroups#!forum/robocode-developers)
-where you can register yourself, and start up a new topic. This is the best
-way of getting information and asking about details for the internals in
-Robocode.
-
-If a contribution is a somewhat small change to involves under 10 files,
-then the preferred way is to provide the contribution as a patch file
-that can be applied to the existing Robocode sources. Otherwise, you can
-be granted a Subversion branch for your work, where you can commit your
-changes. Later, this branch needs to be merged into the trunk be the
-administrators of Robocode and tested carefully. Additional work might
-be done by other Robocode developers to finalize the work.
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/battles/intro.battle b/代码/robocode/robocode.content/target/classes/battles/intro.battle
deleted file mode 100644
index 8bcded0..0000000
--- a/代码/robocode/robocode.content/target/classes/battles/intro.battle
+++ /dev/null
@@ -1,8 +0,0 @@
-#Battle Properties
-robocode.battleField.width=800
-robocode.battleField.height=600
-robocode.battle.numRounds=1
-robocode.battle.gunCoolingRate=0.1
-robocode.battle.rules.inactivityTime=450
-robocode.battle.selectedRobots=sample.Tracker,sample.SittingDuck
-robocode.battle.initialPositions=(50,50,0),(?,?,?)
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/battles/sample.battle b/代码/robocode/robocode.content/target/classes/battles/sample.battle
deleted file mode 100644
index 2be49ab..0000000
--- a/代码/robocode/robocode.content/target/classes/battles/sample.battle
+++ /dev/null
@@ -1,8 +0,0 @@
-#Battle Properties
-robocode.battleField.width=800
-robocode.battleField.height=600
-robocode.battle.numRounds=10
-robocode.battle.gunCoolingRate=0.1
-robocode.battle.rules.inactivityTime=450
-robocode.battle.hideEnemyNames=true
-robocode.battle.selectedRobots=sample.Corners,sample.Fire,sample.MyFirstRobot,sample.SittingDuck,sample.Walls
diff --git a/代码/robocode/robocode.content/target/classes/desktop/robocode.png b/代码/robocode/robocode.content/target/classes/desktop/robocode.png
deleted file mode 100644
index 99b0d5b..0000000
Binary files a/代码/robocode/robocode.content/target/classes/desktop/robocode.png and /dev/null differ
diff --git a/代码/robocode/robocode.content/target/classes/desktop/robocodeMeleeRumble.desktop b/代码/robocode/robocode.content/target/classes/desktop/robocodeMeleeRumble.desktop
deleted file mode 100644
index 2b6a8cf..0000000
--- a/代码/robocode/robocode.content/target/classes/desktop/robocodeMeleeRumble.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-Name=Robocode MeleeRumble
-GenericName=Ranking system of Robocode bots
-Comment=Run MeleeRumble battles for the LiteRumble
-Icon=roborumble
-Exec=robocode-MeleeRumble
-Categories=Game;StrategyGame;
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/desktop/robocodeRoboRumble.desktop b/代码/robocode/robocode.content/target/classes/desktop/robocodeRoboRumble.desktop
deleted file mode 100644
index f366fdf..0000000
--- a/代码/robocode/robocode.content/target/classes/desktop/robocodeRoboRumble.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-Name=Robocode RoboRumble
-GenericName=Ranking system of Robocode bots
-Comment=Run RoboRumble battles for the LiteRumble
-Icon=roborumble
-Exec=robocode-RoboRumble
-Categories=Game;StrategyGame;
diff --git a/代码/robocode/robocode.content/target/classes/desktop/robocodeRobocode.desktop b/代码/robocode/robocode.content/target/classes/desktop/robocodeRobocode.desktop
deleted file mode 100644
index 89c34f6..0000000
--- a/代码/robocode/robocode.content/target/classes/desktop/robocodeRobocode.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-Name=Robocode
-GenericName=Tank AI programming game for Java and .NET
-Comment=Build the best - destroy the rest!
-Icon=robocode
-Exec=robocode-Robocode
-Categories=Game;StrategyGame;
diff --git a/代码/robocode/robocode.content/target/classes/desktop/robocodeTeamRumble.desktop b/代码/robocode/robocode.content/target/classes/desktop/robocodeTeamRumble.desktop
deleted file mode 100644
index d0f1e25..0000000
--- a/代码/robocode/robocode.content/target/classes/desktop/robocodeTeamRumble.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-Name=Robocode TeamRumble
-GenericName=Ranking system of Robocode bots
-Comment=Run TeamRumble battles for the LiteRumble
-Icon=roborumble
-Exec=robocode-TeamRumble
-Categories=Game;StrategyGame;
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/desktop/robocodeTwinDuel.desktop b/代码/robocode/robocode.content/target/classes/desktop/robocodeTwinDuel.desktop
deleted file mode 100644
index 564090b..0000000
--- a/代码/robocode/robocode.content/target/classes/desktop/robocodeTwinDuel.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-Name=Robocode TwinDuel
-GenericName=Ranking system of Robocode bots
-Comment=Run TwinDuel battles for the LiteRumble
-Icon=roborumble
-Exec=robocode-TwinDuel
-Categories=Game;StrategyGame;
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/desktop/roborumble.png b/代码/robocode/robocode.content/target/classes/desktop/roborumble.png
deleted file mode 100644
index f1560d1..0000000
Binary files a/代码/robocode/robocode.content/target/classes/desktop/roborumble.png and /dev/null differ
diff --git a/代码/robocode/robocode.content/target/classes/license/epl-v10.html b/代码/robocode/robocode.content/target/classes/license/epl-v10.html
deleted file mode 100644
index 16e1c6c..0000000
--- a/代码/robocode/robocode.content/target/classes/license/epl-v10.html
+++ /dev/null
@@ -1,188 +0,0 @@
-
-
-Eclipse Public License - Version 1.0
-
-
-
-
-
-Eclipse Public License - v 1.0
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
-LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
-CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-1. DEFINITIONS
-"Contribution" means:
-a) in the case of the initial Contributor, the initial code and
-documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate from
-and are distributed by that particular Contributor. A Contribution 'originates'
-from a Contributor if it was added to the Program by such Contributor itself or
-anyone acting on such Contributor's behalf. Contributions do not include
-additions to the Program which: (i) are separate modules of software distributed
-in conjunction with the Program under their own license agreement, and (ii) are
-not derivative works of the Program.
-"Contributor" means any person or entity that distributes the Program.
-"Licensed Patents" mean patent claims licensable by a Contributor which are
-necessarily infringed by the use or sale of its Contribution alone or when
-combined with the Program.
-"Program" means the Contributions distributed in accordance with this
-Agreement.
-"Recipient" means anyone who receives the Program under this Agreement,
-including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby
-grants Recipient a non-exclusive, worldwide, royalty-free copyright license to
-reproduce, prepare derivative works of, publicly display, publicly perform,
-distribute and sublicense the Contribution of such Contributor, if any, and such
-derivative works, in source code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby
-grants Recipient a non-exclusive, worldwide, royalty-free patent license under
-Licensed Patents to make, use, sell, offer to sell, import and otherwise
-transfer the Contribution of such Contributor, if any, in source code and object
-code form. This patent license shall apply to the combination of the
-Contribution and the Program if, at the time the Contribution is added by the
-Contributor, such addition of the Contribution causes such combination to be
-covered by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is licensed
-hereunder.
-c) Recipient understands that although each Contributor grants the
-licenses to its Contributions set forth herein, no assurances are provided by
-any Contributor that the Program does not infringe the patent or other
-intellectual property rights of any other entity. Each Contributor disclaims any
-liability to Recipient for claims brought by any other entity based on
-infringement of intellectual property rights or otherwise. As a condition to
-exercising the rights and licenses granted hereunder, each Recipient hereby
-assumes sole responsibility to secure any other intellectual property rights
-needed, if any. For example, if a third party patent license is required to
-allow Recipient to distribute the Program, it is Recipient's responsibility to
-acquire that license before distributing the Program.
-d) Each Contributor represents that to its knowledge it has
-sufficient copyright rights in its Contribution, if any, to grant the copyright
-license set forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object code form under
-its own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement;
-and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all
-warranties and conditions, express and implied, including warranties or
-conditions of title and non-infringement, and implied warranties or conditions
-of merchantability and fitness for a particular purpose;
-ii) effectively excludes on behalf of all Contributors all
-liability for damages, including direct, indirect, special, incidental and
-consequential damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement
-are offered by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such
-Contributor, and informs licensees how to obtain it in a reasonable manner on or
-through a medium customarily used for software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the
-Program.
-Contributors may not remove or alter any copyright notices contained within
-the Program.
-Each Contributor must identify itself as the originator of its Contribution,
-if any, in a manner that reasonably allows subsequent Recipients to identify the
-originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities with
-respect to end users, business partners and the like. While this license is
-intended to facilitate the commercial use of the Program, the Contributor who
-includes the Program in a commercial product offering should do so in a manner
-which does not create potential liability for other Contributors. Therefore, if
-a Contributor includes the Program in a commercial product offering, such
-Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
-every other Contributor ("Indemnified Contributor") against any losses, damages
-and costs (collectively "Losses") arising from claims, lawsuits and other legal
-actions brought by a third party against the Indemnified Contributor to the
-extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor to
-control, and cooperate with the Commercial Contributor in, the defense and any
-related settlement negotiations. The Indemnified Contributor may participate in
-any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial product
-offering, Product X. That Contributor is then a Commercial Contributor. If that
-Commercial Contributor then makes performance claims, or offers warranties
-related to Product X, those performance claims and warranties are such
-Commercial Contributor's responsibility alone. Under this section, the
-Commercial Contributor would have to defend claims against the other
-Contributors related to those performance claims and warranties, and if a court
-requires any other Contributor to pay any damages as a result, the Commercial
-Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON
-AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS
-OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
-NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
-Recipient is solely responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its exercise of
-rights under this Agreement , including but not limited to the risks and costs
-of program errors, compliance with applicable laws, damage to or loss of data,
-programs or equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
-CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
-PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
-GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of the
-remainder of the terms of this Agreement, and without further action by the
-parties hereto, such provision shall be reformed to the minimum extent necessary
-to make such provision valid and enforceable.
-If Recipient institutes patent litigation against any entity (including a
-cross-claim or counterclaim in a lawsuit) alleging that the Program itself
-(excluding combinations of the Program with other software or hardware)
-infringes such Recipient's patent(s), then such Recipient's rights granted under
-Section 2(b) shall terminate as of the date such litigation is filed.
-All Recipient's rights under this Agreement shall terminate if it fails to
-comply with any of the material terms or conditions of this Agreement and does
-not cure such failure in a reasonable period of time after becoming aware of
-such noncompliance. If all Recipient's rights under this Agreement terminate,
-Recipient agrees to cease use and distribution of the Program as soon as
-reasonably practicable. However, Recipient's obligations under this Agreement
-and any licenses granted by Recipient relating to the Program shall continue and
-survive.
-Everyone is permitted to copy and distribute copies of this Agreement, but in
-order to avoid inconsistency the Agreement is copyrighted and may only be
-modified in the following manner. The Agreement Steward reserves the right to
-publish new versions (including revisions) of this Agreement from time to time.
-No one other than the Agreement Steward has the right to modify this Agreement.
-The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
-may assign the responsibility to serve as the Agreement Steward to a suitable
-separate entity. Each new version of the Agreement will be given a
-distinguishing version number. The Program (including Contributions) may always
-be distributed subject to the version of the Agreement under which it was
-received. In addition, after a new version of the Agreement is published,
-Contributor may elect to distribute the Program (including its Contributions)
-under the new version. Except as expressly stated in Sections 2(a) and 2(b)
-above, Recipient receives no rights or licenses to the intellectual property of
-any Contributor under this Agreement, whether expressly, by implication,
-estoppel or otherwise. All rights in the Program not expressly granted under
-this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York and the
-intellectual property laws of the United States of America. No party to this
-Agreement will bring a legal action under this Agreement more than one year
-after the cause of action arose. Each party waives its rights to a jury trial in
-any resulting litigation.
diff --git a/代码/robocode/robocode.content/target/classes/meleerumble.bat b/代码/robocode/robocode.content/target/classes/meleerumble.bat
deleted file mode 100644
index 49fef2c..0000000
--- a/代码/robocode/robocode.content/target/classes/meleerumble.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@REM
-@REM Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-@REM All rights reserved. This program and the accompanying materials
-@REM are made available under the terms of the Eclipse Public License v1.0
-@REM which accompanies this distribution, and is available at
-@REM http://robocode.sourceforge.net/license/epl-v10.html
-@REM
-
-java -Xmx1024M -cp libs/robocode.jar;libs/roborumble.jar;libs/codesize-1.1.jar roborumble.RoboRumbleAtHome ./roborumble/meleerumble.txt
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/meleerumble.command b/代码/robocode/robocode.content/target/classes/meleerumble.command
deleted file mode 100644
index f5ac342..0000000
--- a/代码/robocode/robocode.content/target/classes/meleerumble.command
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-################################################################################
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-################################################################################
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xdock:icon=roborumble.ico -Xdock:name=MeleeRumble -Xmx1024M -cp libs/robocode.jar:libs/roborumble.jar:libs/codesize-1.1.jar roborumble.RoboRumbleAtHome ./roborumble/meleerumble.txt
-cd "${pwd}"
diff --git a/代码/robocode/robocode.content/target/classes/meleerumble.sh b/代码/robocode/robocode.content/target/classes/meleerumble.sh
deleted file mode 100644
index e6714a1..0000000
--- a/代码/robocode/robocode.content/target/classes/meleerumble.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-#
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xmx1024M -cp libs/robocode.jar:libs/roborumble.jar:libs/codesize-1.1.jar roborumble.RoboRumbleAtHome ./roborumble/meleerumble.txt
-cd "${pwd}"
diff --git a/代码/robocode/robocode.content/target/classes/robocode.bat b/代码/robocode/robocode.content/target/classes/robocode.bat
deleted file mode 100644
index cdb3c2a..0000000
--- a/代码/robocode/robocode.content/target/classes/robocode.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@REM
-@REM Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-@REM All rights reserved. This program and the accompanying materials
-@REM are made available under the terms of the Eclipse Public License v1.0
-@REM which accompanies this distribution, and is available at
-@REM http://robocode.sourceforge.net/license/epl-v10.html
-@REM
-
-java -Xmx512M -cp libs/robocode.jar robocode.Robocode %*
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/robocode.command b/代码/robocode/robocode.content/target/classes/robocode.command
deleted file mode 100644
index 3065355..0000000
--- a/代码/robocode/robocode.content/target/classes/robocode.command
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-################################################################################
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-################################################################################
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xdock:icon=robocode.ico -Xdock:name=Robocode -Xmx512M -cp libs/robocode.jar robocode.Robocode $*
-cd "${pwd}"
diff --git a/代码/robocode/robocode.content/target/classes/robocode.ico b/代码/robocode/robocode.content/target/classes/robocode.ico
deleted file mode 100644
index 8c469e6..0000000
Binary files a/代码/robocode/robocode.content/target/classes/robocode.ico and /dev/null differ
diff --git a/代码/robocode/robocode.content/target/classes/robocode.sh b/代码/robocode/robocode.content/target/classes/robocode.sh
deleted file mode 100644
index 81ca7de..0000000
--- a/代码/robocode/robocode.content/target/classes/robocode.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-#
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xmx512M -cp libs/robocode.jar robocode.Robocode $*
-cd "${pwd}"
diff --git a/代码/robocode/robocode.content/target/classes/roborumble.bat b/代码/robocode/robocode.content/target/classes/roborumble.bat
deleted file mode 100644
index e056ed9..0000000
--- a/代码/robocode/robocode.content/target/classes/roborumble.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@REM
-@REM Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-@REM All rights reserved. This program and the accompanying materials
-@REM are made available under the terms of the Eclipse Public License v1.0
-@REM which accompanies this distribution, and is available at
-@REM http://robocode.sourceforge.net/license/epl-v10.html
-@REM
-
-java -Xmx512M -cp libs/robocode.jar;libs/roborumble.jar;libs/codesize-1.1.jar; roborumble.RoboRumbleAtHome ./roborumble/roborumble.txt
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/roborumble.command b/代码/robocode/robocode.content/target/classes/roborumble.command
deleted file mode 100644
index 27f9f4b..0000000
--- a/代码/robocode/robocode.content/target/classes/roborumble.command
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-################################################################################
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-################################################################################
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xdock:icon=roborumble.ico -Xdock:name=RoboRumble -Xmx512M -cp libs/robocode.jar:libs/roborumble.jar:libs/codesize-1.1.jar roborumble.RoboRumbleAtHome ./roborumble/roborumble.txt
-cd "${pwd}"
diff --git a/代码/robocode/robocode.content/target/classes/roborumble.ico b/代码/robocode/robocode.content/target/classes/roborumble.ico
deleted file mode 100644
index 927ba6e..0000000
Binary files a/代码/robocode/robocode.content/target/classes/roborumble.ico and /dev/null differ
diff --git a/代码/robocode/robocode.content/target/classes/roborumble.sh b/代码/robocode/robocode.content/target/classes/roborumble.sh
deleted file mode 100644
index b0a4050..0000000
--- a/代码/robocode/robocode.content/target/classes/roborumble.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-#
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xmx512M -cp libs/robocode.jar:libs/roborumble.jar:libs/codesize-1.1.jar roborumble.RoboRumbleAtHome ./roborumble/roborumble.txt
-cd "${pwd}"
diff --git a/代码/robocode/robocode.content/target/classes/roborumble/meleerumble.txt b/代码/robocode/robocode.content/target/classes/roborumble/meleerumble.txt
deleted file mode 100644
index 969673d..0000000
--- a/代码/robocode/robocode.content/target/classes/roborumble/meleerumble.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-#===============================================================================
-# meleerumble.txt - Configuration file for MeleeRumble (melee battles)
-#===============================================================================
-
-#-------------------------------------------------------------------------------
-# User property. It's highly recommendable that you change this to use your name
-#-------------------------------------------------------------------------------
-
-# USER The user name used when uploading the results to the RoboRumble
-# server. Hence, you should replace 'Put_Your_Name_Here' with your
-# name, which could be the initials you use for your robot(s).
-
-USER=Put_Your_Name_Here
-
-#-------------------------------------------------------------------------------
-# Exclude filter used for excluding participants. Use with care!
-#-------------------------------------------------------------------------------
-
-# EXCLUDE A comma separated list of all the participants you want to exclude
-# from the competition. Excluded participants will not be downloaded
-# or take part in battles. This way you can exclude participants that
-# cannot be downloaded due to web servers that are down or hanging,
-# the repository is down, robots/teams that crashes for some reason or
-# cause other trouble.
-#
-# You can use the filename wildcards * and ? in the filter. Example:
-#
-# EXCLUDE=xyz.*v1.?, *Nano*
-
-EXCLUDE=
-
-#-------------------------------------------------------------------------------
-# Properties for controlling the rumble. Use YES or NOT
-#-------------------------------------------------------------------------------
-
-# DOWNLOAD Download data like participants, missing robots, rating files etc.
-# from Internet if these have not been downloaded for 2 hours.
-#
-# EXECUTE Execute battles. Battles files are first created and old battles
-# files are deleted before the battles are executed.
-#
-# UPLOAD Upload results to the RoboRumble server specified by the RESULTSURL
-# property.
-#
-# ITERATE If set to NOT, the rumble will only execute battles once.
-# If set to YES, the rumble will restart with new battles every time
-# the battles have been executed, and it will run infinitely until
-# terminated.
-
-DOWNLOAD=YES
-EXECUTE=YES
-UPLOAD=YES
-ITERATE=YES
-
-# MELEE Must be set if this rumble is meant for melee battles.
-#
-# TEAMS Must be set if this rumble is meant for team battles.
-# This flag is necessary, as jar files for robot teams are different
-# from jar files for ordinary robots.
-
-# MELEE=YES as this property file is meant for melee battles.
-# TEAM=NOT, as this property file is not meant for team battles.
-
-# Do not modify these properties!
-
-MELEE=YES
-TEAMS=NOT
-
-#------------------------------------------------------------------------------
-# Properties for the battle engine
-#------------------------------------------------------------------------------
-
-# FIELDL Battlefield width measured in pixels.
-# FIELDH Battlefield height measured in pixels.
-#
-# NUMBATTLES Number of battles performed per rumble.
-# ROUNDS Number of rounds per battle.
-#
-# MELEEBOTS Number of robots that participate in a melee battle.
-
-# These are standard values for the MeleeRumble. Do not modify these properties!
-
-FIELDL=1000
-FIELDH=1000
-NUMBATTLES=3
-ROUNDS=35
-MELEEBOTS=10
-
-# INPUT Input battles file that is generated by the rumble automatically.
-# The rumble uses this file for selecting which robots that must
-# battle against each other.
-#
-# OUTPUT Battle results file, which is the output of running the rumble.
-
-INPUT=./roborumble/temp/battlesmelee.txt
-OUTPUT=./roborumble/files/resultsmelee.txt
-
-#-------------------------------------------------------------------------------
-# Properties for retrieving robots from Internet
-#-------------------------------------------------------------------------------
-
-# BOTSREP The robot repository where downloaded robots are put.
-#
-# TEMP Directory containing all temporary files for RoboRumble.
-
-BOTSREP=./robots/
-TEMP=./roborumble/temp/
-
-#-------------------------------------------------------------------------------
-# Properties for updating participants from Internet
-#-------------------------------------------------------------------------------
-
-# PARTICIPANTSURL
-# URL to the web page containing all participants of the competition,
-# which will be used for updating the participants file specified with
-# the PARTICIPANTSFILE property.
-#
-# PARTICIPANTSFILE
-# File containing all the participants for the competition.
-#
-# STARTAG Tag marking the start and end of the participants on the web page
-# pointed to with the PARTICIPANTSURL property.
-#
-# UPDATEBOTSURL
-# URL used for removing old participants, which is used for updating
-# the participants file specified with the PARTICIPANTSFILE property.
-
-PARTICIPANTSURL=http://robowiki.net/wiki/RoboRumble/Participants/Melee&action=raw
-PARTICIPANTSFILE=./roborumble/files/participmelee.txt
-
-STARTAG=pre
-
-UPDATEBOTSURL=http://literumble.appspot.com/RemoveOldParticipant
-
-#-------------------------------------------------------------------------------
-# Properties to control the way battles are run
-#-------------------------------------------------------------------------------
-
-# RUNONLY If left black or set to GENERAL, a new battle file is created where
-# robots from the participants file are paired at random. The number
-# of robot pairs will match number of battles defined the NUMBATTLES
-# property.
-#
-# If set to MINI, a new battle file is created similar to the one
-# for GENERAL, but it will only contains robots that are MiniBots,
-# which has a code size < 1500 bytes (calculated by the codesize tool).
-#
-# If set to MICRO, a new battle file is created similar to the one
-# for GENERAL, but it will only contains robots that are MicroBots,
-# which has a code size < 750 bytes (calculated by the codesize tool).
-#
-# If set to NANO, a new battle file is created similar to the one for
-# GENERAL, but it will only contains robots that are NanoBots, which
-# has a code size < 250 bytes (calculated by the codesize tool).
-#
-# If set to SERVER (recommended), a new battle file is created which
-# will first of all contain priority battles for robots that that has
-# priority over other robots until they have fought a specific number
-# of battles specified by the BATTLESPERBOT property. The number of
-# battles fought by the individual robots are extracted from the
-# rating files, which are downloaded from the server if the DOWNLOAD
-# property is set to YES. When no more priority battles are left,
-# robots from the participants file are paired at random similar to
-# GENERAL.
-#
-# BATTLESPERBOT
-# The number of battles a robot has to fight before it will no longer
-# have priority over other robots in battles. Prioritizing a robot
-# makes its rating more reliable faster as its number of fought
-# battles increases faster than when it is not prioritized.
-#
-# PRIORITYBATTLESFILE
-# The priority battles file that is generated automatically by the
-# rumble when the RUNONLY property is set to SERVER.
-
-RUNONLY=SERVER
-
-BATTLESPERBOT=2000
-
-PRIORITYBATTLESFILE=./roborumble/temp/prioritymelee.txt
-
-#-------------------------------------------------------------------------------
-# Properties for uploading the results to the server
-#-------------------------------------------------------------------------------
-
-# RESULTSURL
-# URL used for uploading the results to the server.
-#
-# BATTLESNUMFILE
-# File containing the number of battles fought by the robots, which is
-# returned by the server when results are uploaded to the server.
-
-RESULTSURL=http://literumble.appspot.com/UploadedResults
-
-BATTLESNUMFILE=./roborumble/temp/meleebattlesnumber.txt
-
-#-------------------------------------------------------------------------------
-# Properties for related competitions
-#-------------------------------------------------------------------------------
-
-# Related competitions are competitions where participants are a subset of the
-# participants in the general competition.
-#
-# The MiniBots (code size < 1500) are participants of the MiniRumble.
-# The MicroBots (code size < 750) are participants of the MicroRumble.
-# The NanoBots (code size < 250) are participants of the NanoRumble.
-
-# Do not modify these properties!
-
-MINIBOTS=minimeleerumble
-MICROBOTS=micromeleerumble
-NANOBOTS=nanomeleerumble
-
-# CODESIZEFILE:
-# The code size file that is generated automatically by the rumble in
-# order determine the code size of each individual robot.
-
-CODESIZEFILE=./roborumble/files/codesizemelee.txt
-
-#-------------------------------------------------------------------------------
-# Properties for URLs and file names for the rating files to download
-#-------------------------------------------------------------------------------
-
-# RATINGS.URL:
-# URL to where ratings files are located on Internet.
-#
-# RATINGS.GENERAL:
-# File name for the rating file of the general MeleeRumble.
-#
-# RATINGS.MINIBOTS:
-# File name for the rating file of the Melee MiniRumble.
-#
-# RATINGS.MICROBOTS:
-# File name for the rating file of the Melee MicroRumble.
-#
-# RATINGS.NANOBOTS:
-# File name for the rating file of the Melee NanoRumble.
-
-RATINGS.URL=http://literumble.appspot.com/RatingsFile
-
-RATINGS.GENERAL=./roborumble/temp/ratings_m_roborumble.txt
-RATINGS.MINIBOTS=./roborumble/temp/ratings_m_minirumble.txt
-RATINGS.MICROBOTS=./roborumble/temp/ratings_m_microrumble.txt
-RATINGS.NANOBOTS=./roborumble/temp/ratings_m_nanorumble.txt
diff --git a/代码/robocode/robocode.content/target/classes/roborumble/roborumble.properties b/代码/robocode/robocode.content/target/classes/roborumble/roborumble.properties
deleted file mode 100644
index 1df0dea..0000000
--- a/代码/robocode/robocode.content/target/classes/roborumble/roborumble.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-# Connection timeout in milliseconds
-connection.open.timeout=10000
-# Connection read timeout in milliseconds
-connection.read.timeout=10000
-# Download session timeout
-download.session.timeout=10000
diff --git a/代码/robocode/robocode.content/target/classes/roborumble/roborumble.txt b/代码/robocode/robocode.content/target/classes/roborumble/roborumble.txt
deleted file mode 100644
index ae45516..0000000
--- a/代码/robocode/robocode.content/target/classes/roborumble/roborumble.txt
+++ /dev/null
@@ -1,241 +0,0 @@
-#===============================================================================
-# roborumble.txt - Configuration file for RoboRumble (1v1 battles)
-#===============================================================================
-
-#-------------------------------------------------------------------------------
-# Username. It's highly recommendable that you change this to use your name
-#-------------------------------------------------------------------------------
-
-# USER The username used when uploading the results to the RoboRumble
-# server. Hence, you should replace 'Put_Your_Name_Here' with your
-# name, which could be the initials you use for your robot(s).
-
-USER=Put_Your_Name_Here
-
-#-------------------------------------------------------------------------------
-# Exclude filter used for excluding participants. Use with care!
-#-------------------------------------------------------------------------------
-
-# EXCLUDE A comma separated list of all the participants you want to exclude
-# from the competition. Excluded participants will not be downloaded
-# or take part in battles. This way you can exclude participants that
-# cannot be downloaded due to web servers that are down or hanging,
-# the repository is down, robots/teams that crashes for some reason or
-# cause other trouble.
-#
-# You can use the filename wildcards * and ? in the filter. Example:
-#
-# EXCLUDE=xyz.*v1.?, *Nano*
-
-EXCLUDE=
-
-#-------------------------------------------------------------------------------
-# Properties for controlling the rumble. Use YES or NOT
-#-------------------------------------------------------------------------------
-
-# DOWNLOAD Download data like participants, missing robots, rating files etc.
-# from Internet if these have not been downloaded for 2 hours.
-#
-# EXECUTE Execute battles. Battles files are first created and old battles
-# files are deleted before the battles are executed.
-#
-# UPLOAD Upload results to the RoboRumble server specified by the RESULTSURL
-# property.
-#
-# ITERATE If set to NOT, the rumble will only execute battles once.
-# If set to YES, the rumble will restart with new battles every time
-# the battles have been executed, and it will run infinitely until
-# terminated.
-
-DOWNLOAD=YES
-EXECUTE=YES
-UPLOAD=YES
-ITERATE=YES
-
-# MELEE Must be set if this rumble is meant for melee battles.
-#
-# TEAMS Must be set if this rumble is meant for team battles.
-# This flag is necessary, as jar files for robot teams are different
-# from jar files for ordinary robots.
-
-# MELEE=NOT as this property file is not meant for melee battles.
-# TEAM=NOT, as this property file is not meant for team battles.
-
-# Do not modify these properties!
-
-MELEE=NOT
-TEAMS=NOT
-
-#------------------------------------------------------------------------------
-# Properties for the battle engine
-#------------------------------------------------------------------------------
-
-# FIELDL Battlefield width measured in pixels.
-# FIELDH Battlefield height measured in pixels.
-#
-# NUMBATTLES Number of battles performed per rumble.
-# ROUNDS Number of rounds per battle.
-
-# These are standard values for the RoboRumble. Do not modify these properties!
-
-FIELDL=800
-FIELDH=600
-NUMBATTLES=50
-ROUNDS=35
-
-# INPUT Input battles file that is generated by the rumble automatically.
-# The rumble uses this file for selecting which robots that must
-# battle against each other.
-#
-# OUTPUT Battle results file, which is the output of running the rumble.
-
-INPUT=./roborumble/temp/battles1v1.txt
-OUTPUT=./roborumble/files/results1v1.txt
-
-#-------------------------------------------------------------------------------
-# Properties for retrieving robots from Internet
-#-------------------------------------------------------------------------------
-
-# BOTSREP The robot repository where downloaded robots are put.
-#
-# TEMP Directory containing all temporary files for RoboRumble.
-
-BOTSREP=./robots/
-TEMP=./roborumble/temp/
-
-#-------------------------------------------------------------------------------
-# Properties for updating participants from Internet
-#-------------------------------------------------------------------------------
-
-# PARTICIPANTSURL
-# URL to the web page containing all participants of the competition,
-# which will be used for updating the participants file specified with
-# the PARTICIPANTSFILE property.
-#
-# PARTICIPANTSFILE
-# File containing all the participants for the competition.
-#
-# STARTAG Tag marking the start and end of the participants on the web page
-# pointed to with the PARTICIPANTSURL property.
-#
-# UPDATEBOTSURL
-# URL used for removing old participants, which is used for updating
-# the participants file specified with the PARTICIPANTSFILE property.
-
-PARTICIPANTSURL=http://robowiki.net/wiki/RoboRumble/Participants?action=raw
-PARTICIPANTSFILE=./roborumble/files/particip1v1.txt
-
-STARTAG=pre
-
-UPDATEBOTSURL=http://literumble.appspot.com/RemoveOldParticipant
-
-#-------------------------------------------------------------------------------
-# Properties to control the way battles are run
-#-------------------------------------------------------------------------------
-
-# RUNONLY If left black or set to GENERAL, a new battle file is created where
-# robots from the participants file are paired at random. The number
-# of robot pairs will match number of battles defined the NUMBATTLES
-# property.
-#
-# If set to MINI, a new battle file is created similar to the one
-# for GENERAL, but it will only contains robots that are MiniBots,
-# which has a code size < 1500 bytes (calculated by the codesize tool).
-#
-# If set to MICRO, a new battle file is created similar to the one
-# for GENERAL, but it will only contains robots that are MicroBots,
-# which has a code size < 750 bytes (calculated by the codesize tool).
-#
-# If set to NANO, a new battle file is created similar to the one for
-# GENERAL, but it will only contains robots that are NanoBots, which
-# has a code size < 250 bytes (calculated by the codesize tool).
-#
-# If set to SERVER (recommended), a new battle file is created which
-# will first of all contain priority battles for robots that that has
-# priority over other robots until they have fought a specific number
-# of battles specified by the BATTLESPERBOT property. The number of
-# battles fought by the individual robots are extracted from the
-# rating files, which are downloaded from the server if the DOWNLOAD
-# property is set to YES. When no more priority battles are left,
-# robots from the participants file are paired at random similar to
-# GENERAL.
-#
-# BATTLESPERBOT
-# The number of battles a robot has to fight before it will no longer
-# have priority over other robots in battles. Prioritizing a robot
-# makes its rating more reliable faster as its number of fought
-# battles increases faster than when it is not prioritized.
-#
-# PRIORITYBATTLESFILE
-# The priority battles file that is generated automatically by the
-# rumble when the RUNONLY property is set to SERVER.
-
-RUNONLY=SERVER
-
-BATTLESPERBOT=2000
-
-PRIORITYBATTLESFILE=./roborumble/temp/priority1v1.txt
-
-#-------------------------------------------------------------------------------
-# Properties for uploading the results to the server
-#-------------------------------------------------------------------------------
-
-# RESULTSURL
-# URL used for uploading the results to the server.
-#
-# BATTLESNUMFILE
-# File containing the number of battles fought by the robots, which is
-# returned by the server when results are uploaded to the server.
-
-RESULTSURL=http://literumble.appspot.com/UploadedResults
-
-BATTLESNUMFILE=./roborumble/temp/battlesnumber.txt
-
-#-------------------------------------------------------------------------------
-# Properties for related competitions
-#-------------------------------------------------------------------------------
-
-# Related competitions are competitions where participants are a subset of the
-# participants in the general competition.
-#
-# The MiniBots (code size < 1500) are participants of the MiniRumble.
-# The MicroBots (code size < 750) are participants of the MicroRumble.
-# The NanoBots (code size < 250) are participants of the NanoRumble.
-
-# Do not modify these properties!
-
-MINIBOTS=minirumble
-MICROBOTS=microrumble
-NANOBOTS=nanorumble
-
-# CODESIZEFILE:
-# The code size file that is generated automatically by the rumble in
-# order determine the code size of each individual robot.
-
-CODESIZEFILE=./roborumble/files/codesize1v1.txt
-
-#-------------------------------------------------------------------------------
-# Properties for URLs and file names for the rating files to download
-#-------------------------------------------------------------------------------
-
-# RATINGS.URL:
-# URL to where ratings files are located on Internet.
-#
-# RATINGS.GENERAL:
-# File name for the rating file of the general RoboRumble.
-#
-# RATINGS.MINIBOTS:
-# File name for the rating file of the MiniRumble.
-#
-# RATINGS.MICROBOTS:
-# File name for the rating file of the MicroRumble.
-#
-# RATINGS.NANOBOTS:
-# File name for the rating file of the NanoRumble.
-
-RATINGS.URL=http://literumble.appspot.com/RatingsFile
-
-RATINGS.GENERAL=./roborumble/temp/ratings_roborumble.txt
-RATINGS.MINIBOTS=./roborumble/temp/ratings_minirumble.txt
-RATINGS.MICROBOTS=./roborumble/temp/ratings_microrumble.txt
-RATINGS.NANOBOTS=./roborumble/temp/ratings_nanorumble.txt
diff --git a/代码/robocode/robocode.content/target/classes/roborumble/teamrumble.txt b/代码/robocode/robocode.content/target/classes/roborumble/teamrumble.txt
deleted file mode 100644
index cf6262f..0000000
--- a/代码/robocode/robocode.content/target/classes/roborumble/teamrumble.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-#===============================================================================
-# teamrumble.txt - Configuration file for TeamRumble (team battles)
-#===============================================================================
-
-#-------------------------------------------------------------------------------
-# User property. It's highly recommendable that you change this to use your name
-#-------------------------------------------------------------------------------
-
-# USER The user name used when uploading the results to the RoboRumble
-# server. Hence, you should replace 'Put_Your_Name_Here' with your
-# name, which could be the initials you use for your robot(s).
-
-USER=Put_Your_Name_Here
-
-#-------------------------------------------------------------------------------
-# Exclude filter used for excluding participants. Use with care!
-#-------------------------------------------------------------------------------
-
-# EXCLUDE A comma separated list of all the participants you want to exclude
-# from the competition. Excluded participants will not be downloaded
-# or take part in battles. This way you can exclude participants that
-# cannot be downloaded due to web servers that are down or hanging,
-# the repository is down, robots/teams that crashes for some reason or
-# cause other trouble.
-#
-# You can use the filename wildcards * and ? in the filter. Example:
-#
-# EXCLUDE=xyz.*v1.?, *Nano*
-
-EXCLUDE=
-
-#-------------------------------------------------------------------------------
-# Properties for controlling the rumble. Use YES or NOT
-#-------------------------------------------------------------------------------
-
-# DOWNLOAD Download data like participants, missing robots, rating files etc.
-# from Internet if these have not been downloaded for 2 hours.
-#
-# EXECUTE Execute battles. Battles files are first created and old battles
-# files are deleted before the battles are executed.
-#
-# UPLOAD Upload results to the RoboRumble server specified by the RESULTSURL
-# property.
-#
-# ITERATE If set to NOT, the rumble will only execute battles once.
-# If set to YES, the rumble will restart with new battles every time
-# the battles have been executed, and it will run infinitely until
-# terminated.
-
-DOWNLOAD=YES
-EXECUTE=YES
-UPLOAD=YES
-ITERATE=YES
-
-# MELEE Must be set if this rumble is meant for melee battles.
-#
-# TEAMS Must be set if this rumble is meant for team battles.
-# This flag is necessary, as jar files for robot teams are different
-# from jar files for ordinary robots.
-
-# MELEE=NOT as this property file is not meant for melee battles.
-# TEAM=YES, as this property file is meant for team battles.
-
-# Do not modify these properties!
-
-MELEE=NOT
-TEAMS=YES
-
-#------------------------------------------------------------------------------
-# Properties for the battle engine
-#------------------------------------------------------------------------------
-
-# FIELDL Battlefield width measured in pixels.
-# FIELDH Battlefield height measured in pixels.
-#
-# NUMBATTLES Number of battles performed per rumble.
-# ROUNDS Number of rounds per battle.
-
-# These are standard values for the TeamRumble. Do not modify these properties!
-
-FIELDL=1200
-FIELDH=1200
-NUMBATTLES=10
-ROUNDS=10
-
-# INPUT Input battles file that is generated by the rumble automatically.
-# The rumble uses this file for selecting which robots that must
-# battle against each other.
-#
-# OUTPUT Battle results file, which is the output of running the rumble.
-
-INPUT=./roborumble/temp/battlesTeams.txt
-OUTPUT=./roborumble/files/resultsTeams.txt
-
-#-------------------------------------------------------------------------------
-# Properties for retrieving robots from Internet
-#-------------------------------------------------------------------------------
-
-# BOTSREP The robot repository where downloaded robots are put.
-#
-# TEMP Directory containing all temporary files for RoboRumble.
-
-BOTSREP=./robots/
-TEMP=./roborumble/temp/
-
-#-------------------------------------------------------------------------------
-# Properties for updating participants from Internet
-#-------------------------------------------------------------------------------
-
-# PARTICIPANTSURL
-# URL to the web page containing all participants of the competition,
-# which will be used for updating the participants file specified with
-# the PARTICIPANTSFILE property.
-#
-# PARTICIPANTSFILE
-# File containing all the participants for the competition.
-#
-# STARTAG Tag marking the start and end of the participants on the web page
-# pointed to with the PARTICIPANTSURL property.
-#
-# UPDATEBOTSURL
-# URL used for removing old participants, which is used for updating
-# the participants file specified with the PARTICIPANTSFILE property.
-
-PARTICIPANTSURL=http://robowiki.net/wiki/RoboRumble/Participants/Teams&action=raw
-PARTICIPANTSFILE=./roborumble/files/participTeams.txt
-
-STARTAG=pre
-
-UPDATEBOTSURL=http://literumble.appspot.com/RemoveOldParticipant
-
-#-------------------------------------------------------------------------------
-# Properties to control the way battles are run
-#-------------------------------------------------------------------------------
-
-# RUNONLY If left black or set to GENERAL, a new battle file is created where
-# robots from the participants file are paired at random. The number
-# of robot pairs will match number of battles defined the NUMBATTLES
-# property.
-#
-# If set to SERVER (recommended), a new battle file is created which
-# will first of all contain priority battles for robots that that has
-# priority over other robots until they have fought a specific number
-# of battles specified by the BATTLESPERBOT property. The number of
-# battles fought by the individual robots are extracted from the
-# rating files, which are downloaded from the server if the DOWNLOAD
-# property is set to YES. When no more priority battles are left,
-# robots from the participants file are paired at random similar to
-# GENERAL.
-#
-# BATTLESPERBOT
-# The number of battles a robot has to fight before it will no longer
-# have priority over other robots in battles. Prioritizing a robot
-# makes its rating more reliable faster as its number of fought
-# battles increases faster than when it is not prioritized.
-#
-# PRIORITYBATTLESFILE
-# The priority battles file that is generated automatically by the
-# rumble when the RUNONLY property is set to SERVER.
-
-RUNONLY=SERVER
-
-BATTLESPERBOT=200
-
-PRIORITYBATTLESFILE=./roborumble/temp/priorityTeams.txt
-
-#-------------------------------------------------------------------------------
-# Properties for uploading the results to the server
-#-------------------------------------------------------------------------------
-
-# RESULTSURL
-# URL used for uploading the results to the server.
-#
-# BATTLESNUMFILE
-# File containing the number of battles fought by the robots, which is
-# returned by the server when results are uploaded to the server.
-
-RESULTSURL=http://literumble.appspot.com/UploadedResults
-
-BATTLESNUMFILE=./roborumble/temp/teambattlesnumber.txt
-
-#-------------------------------------------------------------------------------
-# Properties for URLs and file names for the rating files to download
-#-------------------------------------------------------------------------------
-
-# RATINGS.URL:
-# URL to where ratings files are located on Internet.
-#
-# RATINGS.GENERAL:
-# File name for the rating file of the general RoboRumble.
-#
-# RATINGS.MINIBOTS:
-# File name for the rating file of the MiniRumble.
-#
-# RATINGS.MICROBOTS:
-# File name for the rating file of the MicroRumble.
-#
-# RATINGS.NANOBOTS:
-# File name for the rating file of the NanoRumble.
-
-RATINGS.URL=http://literumble.appspot.com/RatingsFile
-
-RATINGS.GENERAL=./roborumble/temp/ratings_teamrumble.txt
diff --git a/代码/robocode/robocode.content/target/classes/roborumble/twinduel.txt b/代码/robocode/robocode.content/target/classes/roborumble/twinduel.txt
deleted file mode 100644
index 8fc223b..0000000
--- a/代码/robocode/robocode.content/target/classes/roborumble/twinduel.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-#===============================================================================
-# twinduel.txt - Configuration file for TwinDuel (rumble edition)
-#===============================================================================
-
-#-------------------------------------------------------------------------------
-# User property. It's highly recommendable that you change this to use your name
-#-------------------------------------------------------------------------------
-
-# USER The user name used when uploading the results to the RoboRumble
-# server. Hence, you should replace 'Put_Your_Name_Here' with your
-# name, which could be the initials you use for your robot(s).
-
-USER=Put_Your_Name_Here
-
-#-------------------------------------------------------------------------------
-# Exclude filter used for excluding participants. Use with care!
-#-------------------------------------------------------------------------------
-
-# EXCLUDE A comma separated list of all the participants you want to exclude
-# from the competition. Excluded participants will not be downloaded
-# or take part in battles. This way you can exclude participants that
-# cannot be downloaded due to web servers that are down or hanging,
-# the repository is down, robots/teams that crashes for some reason or
-# cause other trouble.
-#
-# You can use the filename wildcards * and ? in the filter. Example:
-#
-# EXCLUDE=xyz.*v1.?, *Nano*
-
-EXCLUDE=
-
-#-------------------------------------------------------------------------------
-# Properties for controlling the rumble. Use YES or NOT
-#-------------------------------------------------------------------------------
-
-# DOWNLOAD Download data like participants, missing robots, rating files etc.
-# from Internet if these have not been downloaded for 2 hours.
-#
-# EXECUTE Execute battles. Battles files are first created and old battles
-# files are deleted before the battles are executed.
-#
-# UPLOAD Upload results to the RoboRumble server specified by the RESULTSURL
-# property.
-#
-# ITERATE If set to NOT, the rumble will only execute battles once.
-# If set to YES, the rumble will restart with new battles every time
-# the battles have been executed, and it will run infinitely until
-# terminated.
-
-DOWNLOAD=YES
-EXECUTE=YES
-UPLOAD=YES
-ITERATE=YES
-
-# MELEE Must be set if this rumble is meant for melee battles.
-#
-# TEAMS Must be set if this rumble is meant for team battles.
-# This flag is necessary, as jar files for robot teams are different
-# from jar files for ordinary robots.
-
-# MELEE=NOT as this property file is not meant for melee battles.
-# TEAM=YES, as this property file is meant for team battles.
-
-# Do not modify these properties!
-
-MELEE=NOT
-TEAMS=YES
-
-#------------------------------------------------------------------------------
-# Properties for the battle engine
-#------------------------------------------------------------------------------
-
-# FIELDL Battlefield width measured in pixels.
-# FIELDH Battlefield height measured in pixels.
-#
-# NUMBATTLES Number of battles performed per rumble.
-# ROUNDS Number of rounds per battle.
-
-# These are standard values for the TeamRumble. Do not modify these properties!
-
-FIELDL=800
-FIELDH=800
-NUMBATTLES=10
-ROUNDS=75
-
-# INPUT Input battles file that is generated by the rumble automatically.
-# The rumble uses this file for selecting which robots that must
-# battle against each other.
-#
-# OUTPUT Battle results file, which is the output of running the rumble.
-
-INPUT=./roborumble/temp/battlesTwinduel.txt
-OUTPUT=./roborumble/files/resultsTwinduel.txt
-
-#-------------------------------------------------------------------------------
-# Properties for retrieving robots from Internet
-#-------------------------------------------------------------------------------
-
-# BOTSREP The robot repository where downloaded robots are put.
-#
-# TEMP Directory containing all temporary files for RoboRumble.
-
-BOTSREP=./robots/
-TEMP=./roborumble/temp/
-
-#-------------------------------------------------------------------------------
-# Properties for updating participants from Internet
-#-------------------------------------------------------------------------------
-
-# PARTICIPANTSURL
-# URL to the web page containing all participants of the competition,
-# which will be used for updating the participants file specified with
-# the PARTICIPANTSFILE property.
-#
-# PARTICIPANTSFILE
-# File containing all the participants for the competition.
-#
-# STARTAG Tag marking the start and end of the participants on the web page
-# pointed to with the PARTICIPANTSURL property.
-#
-# UPDATEBOTSURL
-# URL used for removing old participants, which is used for updating
-# the participants file specified with the PARTICIPANTSFILE property.
-
-PARTICIPANTSURL=http://robowiki.net/wiki/RoboRumble/Participants/TwinDuel
-PARTICIPANTSFILE=./roborumble/files/participTwinduel.txt
-
-STARTAG=pre
-
-UPDATEBOTSURL=http://literumble.appspot.com/RemoveOldParticipant
-
-#-------------------------------------------------------------------------------
-# Properties to control the way battles are run
-#-------------------------------------------------------------------------------
-
-# RUNONLY If left black or set to GENERAL, a new battle file is created where
-# robots from the participants file are paired at random. The number
-# of robot pairs will match number of battles defined the NUMBATTLES
-# property.
-#
-# If set to SERVER (recommended), a new battle file is created which
-# will first of all contain priority battles for robots that that has
-# priority over other robots until they have fought a specific number
-# of battles specified by the BATTLESPERBOT property. The number of
-# battles fought by the individual robots are extracted from the
-# rating files, which are downloaded from the server if the DOWNLOAD
-# property is set to YES. When no more priority battles are left,
-# robots from the participants file are paired at random similar to
-# GENERAL.
-#
-# BATTLESPERBOT
-# The number of battles a robot has to fight before it will no longer
-# have priority over other robots in battles. Prioritizing a robot
-# makes its rating more reliable faster as its number of fought
-# battles increases faster than when it is not prioritized.
-#
-# PRIORITYBATTLESFILE
-# The priority battles file that is generated automatically by the
-# rumble when the RUNONLY property is set to SERVER.
-
-RUNONLY=SERVER
-
-BATTLESPERBOT=200
-
-PRIORITYBATTLESFILE=./roborumble/temp/priorityTwinduel.txt
-
-#-------------------------------------------------------------------------------
-# Properties for uploading the results to the server
-#-------------------------------------------------------------------------------
-
-# RESULTSURL
-# URL used for uploading the results to the server.
-#
-# BATTLESNUMFILE
-# File containing the number of battles fought by the robots, which is
-# returned by the server when results are uploaded to the server.
-
-RESULTSURL=http://literumble.appspot.com/UploadedResults
-
-BATTLESNUMFILE=./roborumble/temp/twinduelbattlesnumber.txt
-
-#-------------------------------------------------------------------------------
-# Properties for URLs and file names for the rating files to download
-#-------------------------------------------------------------------------------
-
-# RATINGS.URL:
-# URL to where ratings files are located on Internet.
-#
-# RATINGS.GENERAL:
-# File name for the rating file of the general RoboRumble.
-#
-# RATINGS.MINIBOTS:
-# File name for the rating file of the MiniRumble.
-#
-# RATINGS.MICROBOTS:
-# File name for the rating file of the MicroRumble.
-#
-# RATINGS.NANOBOTS:
-# File name for the rating file of the NanoRumble.
-
-RATINGS.URL=http://literumble.appspot.com/RatingsFile
-
-RATINGS.GENERAL=./roborumble/temp/ratings_twinduel.txt
diff --git a/代码/robocode/robocode.content/target/classes/teamrumble.bat b/代码/robocode/robocode.content/target/classes/teamrumble.bat
deleted file mode 100644
index 3d97f1f..0000000
--- a/代码/robocode/robocode.content/target/classes/teamrumble.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@REM
-@REM Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-@REM All rights reserved. This program and the accompanying materials
-@REM are made available under the terms of the Eclipse Public License v1.0
-@REM which accompanies this distribution, and is available at
-@REM http://robocode.sourceforge.net/license/epl-v10.html
-@REM
-
-java -Xmx512M -cp libs/robocode.jar;libs/roborumble.jar;libs/codesize-1.1.jar; roborumble.RoboRumbleAtHome ./roborumble/teamrumble.txt
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/teamrumble.command b/代码/robocode/robocode.content/target/classes/teamrumble.command
deleted file mode 100644
index c103230..0000000
--- a/代码/robocode/robocode.content/target/classes/teamrumble.command
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-################################################################################
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-################################################################################
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xdock:icon=roborumble.ico -Xdock:name=TeamRumble -Xmx512M -cp libs/robocode.jar:libs/roborumble.jar:libs/codesize-1.1.jar roborumble.RoboRumbleAtHome ./roborumble/teamrumble.txt
-cd "${pwd}"
diff --git a/代码/robocode/robocode.content/target/classes/teamrumble.sh b/代码/robocode/robocode.content/target/classes/teamrumble.sh
deleted file mode 100644
index 96b6e82..0000000
--- a/代码/robocode/robocode.content/target/classes/teamrumble.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-#
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xmx512M -cp libs/robocode.jar:libs/roborumble.jar:libs/codesize-1.1.jar roborumble.RoboRumbleAtHome ./roborumble/teamrumble.txt
-cd "${pwd}"
diff --git a/代码/robocode/robocode.content/target/classes/templates/newjavafile.tpt b/代码/robocode/robocode.content/target/classes/templates/newjavafile.tpt
deleted file mode 100644
index b5bbc36..0000000
--- a/代码/robocode/robocode.content/target/classes/templates/newjavafile.tpt
+++ /dev/null
@@ -1,8 +0,0 @@
-package $PACKAGE;
-
-/**
- * $CLASSNAME - a class by (your name here)
- */
-public class $CLASSNAME
-{
-}
diff --git a/代码/robocode/robocode.content/target/classes/templates/newjuniorrobot.tpt b/代码/robocode/robocode.content/target/classes/templates/newjuniorrobot.tpt
deleted file mode 100644
index c7f0ec8..0000000
--- a/代码/robocode/robocode.content/target/classes/templates/newjuniorrobot.tpt
+++ /dev/null
@@ -1,54 +0,0 @@
-package $PACKAGE;
-import robocode.*;
-
-// API help : http://robocode.sourceforge.net/docs/robocode/robocode/JuniorRobot.html
-
-/**
- * $CLASSNAME - a robot by (your name here)
- */
-public class $CLASSNAME extends JuniorRobot
-{
- /**
- * run: $CLASSNAME's default behavior
- */
- public void run() {
- // Initialization of the robot should be put here
-
- // Some color codes: blue, yellow, black, white, red, pink, brown, grey, orange...
- // Sets these colors (robot parts): body, gun, radar, bullet, scan_arc
- setColors(orange, blue, white, yellow, black);
-
- // Robot main loop
- while(true) {
- // Replace the next 4 lines with any behavior you would like
- ahead(100);
- turnGunRight(360);
- back(100);
- turnGunRight(360);
- }
- }
-
- /**
- * onScannedRobot: What to do when you see another robot
- */
- public void onScannedRobot() {
- // Replace the next line with any behavior you would like
- fire(1);
- }
-
- /**
- * onHitByBullet: What to do when you're hit by a bullet
- */
- public void onHitByBullet() {
- // Replace the next line with any behavior you would like
- back(10);
- }
-
- /**
- * onHitWall: What to do when you hit a wall
- */
- public void onHitWall() {
- // Replace the next line with any behavior you would like
- back(20);
- }
-}
diff --git a/代码/robocode/robocode.content/target/classes/templates/newrobot.tpt b/代码/robocode/robocode.content/target/classes/templates/newrobot.tpt
deleted file mode 100644
index 070e471..0000000
--- a/代码/robocode/robocode.content/target/classes/templates/newrobot.tpt
+++ /dev/null
@@ -1,56 +0,0 @@
-package $PACKAGE;
-import robocode.*;
-//import java.awt.Color;
-
-// API help : http://robocode.sourceforge.net/docs/robocode/robocode/Robot.html
-
-/**
- * $CLASSNAME - a robot by (your name here)
- */
-public class $CLASSNAME extends Robot
-{
- /**
- * run: $CLASSNAME's default behavior
- */
- public void run() {
- // Initialization of the robot should be put here
-
- // After trying out your robot, try uncommenting the import at the top,
- // and the next line:
-
- // setColors(Color.red,Color.blue,Color.green); // body,gun,radar
-
- // Robot main loop
- while(true) {
- // Replace the next 4 lines with any behavior you would like
- ahead(100);
- turnGunRight(360);
- back(100);
- turnGunRight(360);
- }
- }
-
- /**
- * onScannedRobot: What to do when you see another robot
- */
- public void onScannedRobot(ScannedRobotEvent e) {
- // Replace the next line with any behavior you would like
- fire(1);
- }
-
- /**
- * onHitByBullet: What to do when you're hit by a bullet
- */
- public void onHitByBullet(HitByBulletEvent e) {
- // Replace the next line with any behavior you would like
- back(10);
- }
-
- /**
- * onHitWall: What to do when you hit a wall
- */
- public void onHitWall(HitWallEvent e) {
- // Replace the next line with any behavior you would like
- back(20);
- }
-}
diff --git a/代码/robocode/robocode.content/target/classes/theme/editor/Robocode Black Theme.properties b/代码/robocode/robocode.content/target/classes/theme/editor/Robocode Black Theme.properties
deleted file mode 100644
index bd627b6..0000000
--- a/代码/robocode/robocode.content/target/classes/theme/editor/Robocode Black Theme.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-#Robocode Editor Theme Properties
-#Sun Sep 15 22:13:41 CEST 2013
-editor.theme=Robocode Black Theme
-editor.font.name=Monospaced
-editor.font.size=14
-editor.background.color=000000
-editor.lineNumber.background.color=22222
-editor.lineNumber.text.color=00CC00
-editor.highlighted.line.color=999999
-editor.selected.text.color=993300
-editor.selected.background.color=FFFFFF
-editor.text.style.normal=Plain
-editor.text.color.normal=00FFFF
-editor.text.style.keyword=Bold
-editor.text.color.keyword=0000FF
-editor.text.style.literal=Plain
-editor.text.color.literal=FFFF00
-editor.text.style.comment=Italic
-editor.text.color.comment=00FF00
-editor.text.style.quoted=Plain
-editor.text.color.quoted=FF0000
-editor.text.style.annotation=Plain
-editor.text.color.annotation=FF00FF
diff --git a/代码/robocode/robocode.content/target/classes/theme/editor/Robocode White Theme.properties b/代码/robocode/robocode.content/target/classes/theme/editor/Robocode White Theme.properties
deleted file mode 100644
index 0eecd3e..0000000
--- a/代码/robocode/robocode.content/target/classes/theme/editor/Robocode White Theme.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-#Robocode Editor Theme Properties
-#Wed Jul 31 14:51:10 CEST 2013
-editor.theme=Robocode White Theme
-editor.font.name=Monospaced
-editor.font.size=14
-editor.background.color=FFFFFF
-editor.lineNumber.background.color=EEEEEE
-editor.lineNumber.text.color=000000
-editor.highlighted.line.color=FFFFCC
-editor.selected.text.color=FFFFFF
-editor.selected.background.color=3399FF
-editor.text.style.normal=Plain
-editor.text.color.normal=000000
-editor.text.style.keyword=Bold
-editor.text.color.keyword=0000AF
-editor.text.style.literal=Bold
-editor.text.color.literal=0000AF
-editor.text.style.comment=Plain
-editor.text.color.comment=00AF00
-editor.text.style.quoted=Plain
-editor.text.color.quoted=7F0000
-editor.text.style.annotation=Plain
-editor.text.color.annotation=7F7F7F
diff --git a/代码/robocode/robocode.content/target/classes/twinduel.bat b/代码/robocode/robocode.content/target/classes/twinduel.bat
deleted file mode 100644
index c5573f2..0000000
--- a/代码/robocode/robocode.content/target/classes/twinduel.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@REM
-@REM Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-@REM All rights reserved. This program and the accompanying materials
-@REM are made available under the terms of the Eclipse Public License v1.0
-@REM which accompanies this distribution, and is available at
-@REM http://robocode.sourceforge.net/license/epl-v10.html
-@REM
-
-java -Xmx512M -cp libs/robocode.jar;libs/roborumble.jar;libs/codesize-1.1.jar; roborumble.RoboRumbleAtHome ./roborumble/twinduel.txt
\ No newline at end of file
diff --git a/代码/robocode/robocode.content/target/classes/twinduel.command b/代码/robocode/robocode.content/target/classes/twinduel.command
deleted file mode 100644
index a61c9e8..0000000
--- a/代码/robocode/robocode.content/target/classes/twinduel.command
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-################################################################################
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-################################################################################
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xdock:icon=roborumble.ico -Xdock:name=TwinDuel -Xmx512M -cp libs/robocode.jar:libs/roborumble.jar:libs/codesize-1.1.jar roborumble.RoboRumbleAtHome ./roborumble/twinduel.txt
-cd "${pwd}"
diff --git a/代码/robocode/robocode.content/target/classes/twinduel.sh b/代码/robocode/robocode.content/target/classes/twinduel.sh
deleted file mode 100644
index 1669b1b..0000000
--- a/代码/robocode/robocode.content/target/classes/twinduel.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://robocode.sourceforge.net/license/epl-v10.html
-#
-
-pwd=`pwd`
-cd "${0%/*}"
-java -Xmx512M -cp libs/robocode.jar:libs/roborumble.jar:libs/codesize-1.1.jar roborumble.RoboRumbleAtHome ./roborumble/twinduel.txt
-cd "${pwd}"
diff --git a/代码/robocode/robocode.installer/target/classes/net/sf/robocode/installer/AutoExtract$1.class b/代码/robocode/robocode.installer/target/classes/net/sf/robocode/installer/AutoExtract$1.class
deleted file mode 100644
index 2e47a10..0000000
Binary files a/代码/robocode/robocode.installer/target/classes/net/sf/robocode/installer/AutoExtract$1.class and /dev/null differ
diff --git a/代码/robocode/robocode.installer/target/classes/net/sf/robocode/installer/AutoExtract.class b/代码/robocode/robocode.installer/target/classes/net/sf/robocode/installer/AutoExtract.class
deleted file mode 100644
index b25dbc8..0000000
Binary files a/代码/robocode/robocode.installer/target/classes/net/sf/robocode/installer/AutoExtract.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Corners.class b/代码/robocode/robocode.samples/target/classes/sample/Corners.class
deleted file mode 100644
index 5b89358..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Corners.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Corners.properties b/代码/robocode/robocode.samples/target/classes/sample/Corners.properties
deleted file mode 100644
index 86a295d..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/Corners.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:14:27 EST 2006
-robot.description=\ A sample robot\n Moves to a corner, then swings the gun back and forth.\n If it dies, it tries a new corner in the next round.
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.Corners
-robot.name=Corners
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Crazy.class b/代码/robocode/robocode.samples/target/classes/sample/Crazy.class
deleted file mode 100644
index fda7610..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Crazy.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Crazy.properties b/代码/robocode/robocode.samples/target/classes/sample/Crazy.properties
deleted file mode 100644
index adc9001..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/Crazy.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:16:04 EST 2006
-robot.description=\ A sample robot\n\n Moves around in a crazy pattern
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.Crazy
-robot.name=Crazy
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Fire.class b/代码/robocode/robocode.samples/target/classes/sample/Fire.class
deleted file mode 100644
index 0f09962..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Fire.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Fire.properties b/代码/robocode/robocode.samples/target/classes/sample/Fire.properties
deleted file mode 100644
index db0f3a7..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/Fire.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:16:33 EST 2007
-robot.description=\ A sample robot\n\n Sits still. Spins gun around. Moves when hit. Ooh\!
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.Fire
-robot.name=Fire
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Interactive.class b/代码/robocode/robocode.samples/target/classes/sample/Interactive.class
deleted file mode 100644
index 5461643..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Interactive.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Interactive.properties b/代码/robocode/robocode.samples/target/classes/sample/Interactive.properties
deleted file mode 100644
index 66603d1..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/Interactive.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Wed Jun 27 23:08:48 EST 2007
-robot.description=\ A sample robot\n\n This is a robot that is controlled using the arrow keys and mouse only
-robot.webpage=
-robocode.version=1.3.4
-robot.java.source.included=true
-robot.author.name=Flemming N. Larsen
-robot.classname=sample.Interactive
-robot.name=Interactive
\ No newline at end of file
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Interactive_v2$Direction.class b/代码/robocode/robocode.samples/target/classes/sample/Interactive_v2$Direction.class
deleted file mode 100644
index 6f5b802..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Interactive_v2$Direction.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Interactive_v2.class b/代码/robocode/robocode.samples/target/classes/sample/Interactive_v2.class
deleted file mode 100644
index b6017a4..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Interactive_v2.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Interactive_v2.properties b/代码/robocode/robocode.samples/target/classes/sample/Interactive_v2.properties
deleted file mode 100644
index aab1784..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/Interactive_v2.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-#Robot Properties
-robot.description=\ A sample robot\n\n This is a robot that is controlled using the arrow keys and mouse only
-robot.webpage=
-robocode.version=1.3.4
-robot.java.source.included=true
-robot.author.name=Tuan Anh Nguyen and Flemming N. Larsen
-robot.classname=sample.Interactive_v2
-robot.name=Interactive_v2
\ No newline at end of file
diff --git a/代码/robocode/robocode.samples/target/classes/sample/MyFirstJuniorRobot.class b/代码/robocode/robocode.samples/target/classes/sample/MyFirstJuniorRobot.class
deleted file mode 100644
index 8717b0c..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/MyFirstJuniorRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/MyFirstJuniorRobot.properties b/代码/robocode/robocode.samples/target/classes/sample/MyFirstJuniorRobot.properties
deleted file mode 100644
index 2cafbdc..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/MyFirstJuniorRobot.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Jul 29 00:07:28 EST 2007
-robot.description=\ A sample robot\n Moves in a seesaw motion, and spins the gun around at each end\n Moves perpendicular to the direction of a bullet that hits it
-robot.webpage=
-robocode.version=1.4
-robot.java.source.included=true
-robot.author.name=Flemming N. Larsen
-robot.classname=sample.MyFirstJuniorRobot
-robot.name=MyFirstJuniorRobot
\ No newline at end of file
diff --git a/代码/robocode/robocode.samples/target/classes/sample/MyFirstRobot.class b/代码/robocode/robocode.samples/target/classes/sample/MyFirstRobot.class
deleted file mode 100644
index 55916b7..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/MyFirstRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/MyFirstRobot.properties b/代码/robocode/robocode.samples/target/classes/sample/MyFirstRobot.properties
deleted file mode 100644
index 1d298da..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/MyFirstRobot.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Fri Nov 02 17:17:44 EST 2001
-robot.description=\ A sample robot\n Moves in a seesaw motion, and spins the gun around at each end\n Turns perpendicular to the direction of a bullet that hits it
-robot.webpage=http\://robocode.sourceforge.net/myfirstrobot/MyFirstRobot.html
-robocode.version=1.0
-robot.java.source.included=true
-robot.author.name=Mathew Nelson
-robot.classname=sample.MyFirstRobot
-robot.name=MyFirstRobot
diff --git a/代码/robocode/robocode.samples/target/classes/sample/PaintingRobot.class b/代码/robocode/robocode.samples/target/classes/sample/PaintingRobot.class
deleted file mode 100644
index cd1ef4d..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/PaintingRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/PaintingRobot.properties b/代码/robocode/robocode.samples/target/classes/sample/PaintingRobot.properties
deleted file mode 100644
index df0c29e..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/PaintingRobot.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-#Robot Properties
-#Sat Apr 12 14:47:44 EST 2008
-robot.description=\ A sample robot\n Demonstrates how to do custom painting and debugging properties.
-robot.webpage=
-robocode.version=1.6
-robot.java.source.included=true
-robot.author.name=Stefan Westen
-robot.classname=sample.PaintingRobot
-robot.name=PaintingRobot
-
diff --git a/代码/robocode/robocode.samples/target/classes/sample/RamFire.class b/代码/robocode/robocode.samples/target/classes/sample/RamFire.class
deleted file mode 100644
index 5af3693..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/RamFire.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/RamFire.properties b/代码/robocode/robocode.samples/target/classes/sample/RamFire.properties
deleted file mode 100644
index e48d0d4..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/RamFire.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:17:21 EST 2007
-robot.description=\ A sample robot\n Drives at robots trying to ram them.\n Fires when it hits them.
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.RamFire
-robot.name=RamFire
diff --git a/代码/robocode/robocode.samples/target/classes/sample/SittingDuck.class b/代码/robocode/robocode.samples/target/classes/sample/SittingDuck.class
deleted file mode 100644
index 6705c16..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/SittingDuck.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/SittingDuck.html b/代码/robocode/robocode.samples/target/classes/sample/SittingDuck.html
deleted file mode 100644
index 9f4d522..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/SittingDuck.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
- SittingDuck's Webpage
-
-
-
-
-
-Hi! I'm a sitting duck.
-
-
-
-
\ No newline at end of file
diff --git a/代码/robocode/robocode.samples/target/classes/sample/SittingDuck.properties b/代码/robocode/robocode.samples/target/classes/sample/SittingDuck.properties
deleted file mode 100644
index c3aab1e..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/SittingDuck.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:18:07 EST 2007
-robot.description=\ A sample robot\nThis robot sits still, and waits to be fired upon. Exciting stuff\!\nAlso counts how many times he has been a sitting duck.
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.SittingDuck
-robot.name=SittingDuck
diff --git a/代码/robocode/robocode.samples/target/classes/sample/SpinBot.class b/代码/robocode/robocode.samples/target/classes/sample/SpinBot.class
deleted file mode 100644
index 7602f84..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/SpinBot.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/SpinBot.properties b/代码/robocode/robocode.samples/target/classes/sample/SpinBot.properties
deleted file mode 100644
index c80fa0b..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/SpinBot.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:18:07 EST 2006
-robot.description=\ A sample robot\n\n Moves in a circle, firing hard when an enemy is detected
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.SpinBot
-robot.name=SpinBot
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Target$1.class b/代码/robocode/robocode.samples/target/classes/sample/Target$1.class
deleted file mode 100644
index b684674..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Target$1.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Target.class b/代码/robocode/robocode.samples/target/classes/sample/Target.class
deleted file mode 100644
index f559d6c..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Target.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Target.properties b/代码/robocode/robocode.samples/target/classes/sample/Target.properties
deleted file mode 100644
index 4537956..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/Target.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:18:46 EST 2006
-robot.description=\ A sample robot\n Sits still. Moves every time energy drops by 20.\n This Robot demonstrates custom events.
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.Target
-robot.name=Target
diff --git a/代码/robocode/robocode.samples/target/classes/sample/TrackFire.class b/代码/robocode/robocode.samples/target/classes/sample/TrackFire.class
deleted file mode 100644
index 637b93f..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/TrackFire.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/TrackFire.properties b/代码/robocode/robocode.samples/target/classes/sample/TrackFire.properties
deleted file mode 100644
index be9b3e8..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/TrackFire.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:21:08 EST 2006
-robot.description=\ A sample robot\n\n Tracks and fires at the nearest robot it sees
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.TrackFire
-robot.name=TrackFire
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Tracker.class b/代码/robocode/robocode.samples/target/classes/sample/Tracker.class
deleted file mode 100644
index 4c68e88..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Tracker.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Tracker.properties b/代码/robocode/robocode.samples/target/classes/sample/Tracker.properties
deleted file mode 100644
index 1e510a5..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/Tracker.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:20:26 EST 2006
-robot.description=\ A sample robot\n\n Locks onto a robot, moves close, fires when close.
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.Tracker
-robot.name=Tracker
diff --git a/代码/robocode/robocode.samples/target/classes/sample/VelociRobot.class b/代码/robocode/robocode.samples/target/classes/sample/VelociRobot.class
deleted file mode 100644
index 6c1edd9..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/VelociRobot.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/VelociRobot.properties b/代码/robocode/robocode.samples/target/classes/sample/VelociRobot.properties
deleted file mode 100644
index a48dbb8..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/VelociRobot.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Tue May 27 14:21:08 EST 2009
-robot.description=\ A sample robot\n\n Demonstrates the RateControlRobot
-robot.webpage=
-robocode.version=1.7.1.3
-robot.java.source.included=true
-robot.author.name=Joshua Galecki
-robot.classname=sample.VelociRobot
-robot.name=VelociRobot
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Walls.class b/代码/robocode/robocode.samples/target/classes/sample/Walls.class
deleted file mode 100644
index bb6f236..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/Walls.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/Walls.properties b/代码/robocode/robocode.samples/target/classes/sample/Walls.properties
deleted file mode 100644
index 7549037..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/Walls.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Aug 20 21:21:53 EST 2006
-robot.description=\ A sample robot\n\n Moves around the outer edge with the gun facing in
-robot.webpage=
-robocode.version=1.1.2
-robot.java.source.included=true
-robot.author.name=Mathew Nelson and Flemming N. Larsen
-robot.classname=sample.Walls
-robot.name=Walls
diff --git a/代码/robocode/robocode.samples/target/classes/sample/pandafighter.class b/代码/robocode/robocode.samples/target/classes/sample/pandafighter.class
deleted file mode 100644
index 1dc4430..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sample/pandafighter.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sample/pandafighter.java b/代码/robocode/robocode.samples/target/classes/sample/pandafighter.java
deleted file mode 100644
index 09420f9..0000000
--- a/代码/robocode/robocode.samples/target/classes/sample/pandafighter.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.pandafighter;
-import robocode.*;
-import java.awt.geom.Point2D;
-import java.awt.Color;
-public class pandafighter extends AdvancedRobot
-{
-double moveDirection;
-enemyStat enemy = new enemyStat();
-public void run()
- {
- setBodyColor(Color.black);
- setGunColor(Color.WHITE);
- setRadarColor(Color.WHITE);
- setScanColor(Color.BLACK);
- setBulletColor(Color.YELLOW);
- setAdjustGunForRobotTurn(true);
- setAdjustRadarForGunTurn(true);
- setTurnRadarRightRadians(2*Math.PI); //״һֱת
- while(true)
- {
- doFire();
- doScannedRobot();
- doMovement() ;
- execute();
- }
- }
-public void onScannedRobot(ScannedRobotEvent e)
- {
- enemy.updateStat(e, this);
- }
- public void doMovement()//ƶ
- { //ж˶Ƿɣɣѡһ㣬ƶõ
- if( Math.abs( getDistanceRemaining() ) < 1 )
- {
- double myX = getX();
- double myY = getY();
- double nextX, nextY; // the next point move to
- nextX = Math.random() * ( getBattleFieldWidth() - 100 ) + 50;
- nextY = Math.random() * ( getBattleFieldHeight() - 100 ) + 50;
- double turnAngle =getAngle(myX,myY,nextX,nextY );
- turnAngle = normalizeBearing( turnAngle - getHeadingRadians() );
- double moveDistance = Point2D.distance( myX, myY, nextX, nextY );
- double moveDirection = 1;
- if ( Math.abs( turnAngle ) >Math.PI/2)
- {
- turnAngle = normalizeBearing( turnAngle + Math.PI);
- moveDirection *= -1;
- }
- setTurnRightRadians( turnAngle );
- setAhead( moveDirection * moveDistance ); }
- }
- public static double getAngle(double x1, double y1, double x2, double y2)
- {
- return Math.atan2( x2 - x1, y2 - y1 );
- }
- public void doScannedRobot()
- {
- if (getTime()-enemy.time>1)
- {
- setTurnRadarRightRadians(3*Math.PI);
- }
- else
- {
- double absolation_bearing=(getHeadingRadians()+enemy.relative_bearing)%(2*Math.PI);
- double relative_radar_bearing=getRadarHeadingRadians()-absolation_bearing;
- double a=normalizeBearing(relative_radar_bearing);
- setTurnRadarLeftRadians(a);
- }
- }
-public double normalizeBearing( double angle )
- {
- if ( angle < -Math.PI )
- angle += 2*Math.PI;
- if ( angle > Math.PI )
- angle -= 2*Math.PI;
- return angle;
- }
- public void doFire()
- {
- double heading_offset=enemy.en_heading-enemy.pre_heading+0.000001;
- double distance=enemy.distance;
- double bullet_velocity=20-3*3;
- double r=enemy.velocity/heading_offset;
- double heading=0.0;
- for(int i=0;i<4;i++)// ʹԤȷ
- {
- double b_travel_ti=distance/bullet_velocity;
- double predict_heading_r=enemy.en_heading+heading_offset*b_travel_ti;
- double predict_x=enemy.xCoordinate-r*Math.cos(predict_heading_r)+r*Math.cos(enemy.en_heading);
- double predict_y=enemy.yCoordinate+r*Math.sin(predict_heading_r)-r*Math.sin(enemy.en_heading);
- heading=Math.atan2(predict_x-getX(),predict_y-getY());
- double diatance=Point2D.distance( getX(), getY(), predict_x, predict_y );
- }
- double a=normalizeBearing(heading-getGunHeadingRadians());
- setTurnGunRightRadians(a);
- setFire(3);
- }
- public void onHitByBullet(HitByBulletEvent e)
- {
- if(getX()>150&&getY()>150&&enemy.battle_w-getX()>150&&enemy.battle_h-getY()>150)
- {
- double dist=150;
- double a=normalizeBearing(90 - (getHeading() - e.getHeading()));
- if(Math.abs(a)>Math.PI/2)
- {
- a=normalizeBearing(a+Math.PI);
- }
- setTurnRight( a);
- setAhead(dist);
- dist *= -1;
- }
- }
-public void onWin(WinEvent e)
- {
- for (int i = 0; i < 50; i++)
- {
- turnGunRightRadians(Math.PI*3/4);
- turnGunLeftRadians(Math.PI*3/4);
- }
- }
-}
-class enemyStat //
-
- { public double pre_heading;
- public double en_heading;
- double xCoordinate;
- double yCoordinate;
- double direction;
- double battle_h;
- double battle_w;
- double relative_bearing;
- double velocity;
- double time;
- double distance;
- public void updateStat(ScannedRobotEvent e,AdvancedRobot ar)
- {
- pre_heading=en_heading;
- en_heading=e.getHeadingRadians();
- battle_h=ar.getBattleFieldHeight();
- battle_w=ar.getBattleFieldWidth();
- relative_bearing=e.getBearingRadians();
- direction = relative_bearing + ar.getHeadingRadians();
- xCoordinate= ar.getX() + Math.sin( direction ) * distance;
- yCoordinate = ar.getY() + Math.cos( direction ) *distance;
- velocity=e.getVelocity();
- time=e.getTime();
- distance=e.getDistance();
- }
- }
\ No newline at end of file
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/Alien.class b/代码/robocode/robocode.samples/target/classes/sampleex/Alien.class
deleted file mode 100644
index 4ff8a4c..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/Alien.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/Alien.properties b/代码/robocode/robocode.samples/target/classes/sampleex/Alien.properties
deleted file mode 100644
index 292c411..0000000
--- a/代码/robocode/robocode.samples/target/classes/sampleex/Alien.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Feb 20 21:16:33 EST 2008
-robot.description=\ A sample robot\n\n Is not inherited from classic base robots,\n uses new experimental access to RobotPeer.
-robot.webpage=zamboch.blogspot.com
-robocode.version=1.6
-robot.java.source.included=true
-robot.author.name=Pavel Savara
-robot.classname=sampleex.Alien
-robot.name=Alien
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/AlienComposition$AlienEventHandler.class b/代码/robocode/robocode.samples/target/classes/sampleex/AlienComposition$AlienEventHandler.class
deleted file mode 100644
index d11f0fc..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/AlienComposition$AlienEventHandler.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/AlienComposition$AlienMain.class b/代码/robocode/robocode.samples/target/classes/sampleex/AlienComposition$AlienMain.class
deleted file mode 100644
index a1a38b1..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/AlienComposition$AlienMain.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/AlienComposition.class b/代码/robocode/robocode.samples/target/classes/sampleex/AlienComposition.class
deleted file mode 100644
index 20b73fb..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/AlienComposition.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/GreyEminence.class b/代码/robocode/robocode.samples/target/classes/sampleex/GreyEminence.class
deleted file mode 100644
index d91efcc..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/GreyEminence.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/MasterAndSlave.class b/代码/robocode/robocode.samples/target/classes/sampleex/MasterAndSlave.class
deleted file mode 100644
index 45dbfea..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/MasterAndSlave.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/MasterAndSlave.properties b/代码/robocode/robocode.samples/target/classes/sampleex/MasterAndSlave.properties
deleted file mode 100644
index 539d240..0000000
--- a/代码/robocode/robocode.samples/target/classes/sampleex/MasterAndSlave.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Feb 20 21:16:33 EST 2008
-robot.description=\ A sample robot\n\n Is not inherited from classic base robots,\n uses new experimental access to RobotPeer.
-robot.webpage=zamboch.blogspot.com
-robocode.version=1.6
-robot.java.source.included=true
-robot.author.name=Pavel Savara
-robot.classname=sampleex.MasterAndSlave
-robot.name=MasterAndSlave
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/MasterBase.class b/代码/robocode/robocode.samples/target/classes/sampleex/MasterBase.class
deleted file mode 100644
index d9f90f7..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/MasterBase.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/ProxyOfGreyEminence.class b/代码/robocode/robocode.samples/target/classes/sampleex/ProxyOfGreyEminence.class
deleted file mode 100644
index 714e308..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/ProxyOfGreyEminence.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/ProxyOfGreyEminence.properties b/代码/robocode/robocode.samples/target/classes/sampleex/ProxyOfGreyEminence.properties
deleted file mode 100644
index e47c5a0..0000000
--- a/代码/robocode/robocode.samples/target/classes/sampleex/ProxyOfGreyEminence.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sun Feb 20 21:16:33 EST 2008
-robot.description=\ A sample robot\n\n Is not inherited from classic base robots,\n uses new experimental access to RobotPeer.
-robot.webpage=zamboch.blogspot.com
-robocode.version=1.6
-robot.java.source.included=true
-robot.author.name=Pavel Savara
-robot.classname=sampleex.ProxyOfGreyEminence
-robot.name=ProxyOfGreyEminence
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/RegullarMonk.class b/代码/robocode/robocode.samples/target/classes/sampleex/RegullarMonk.class
deleted file mode 100644
index e5044ff..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/RegullarMonk.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleex/Slave.class b/代码/robocode/robocode.samples/target/classes/sampleex/Slave.class
deleted file mode 100644
index 0af7ecb..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleex/Slave.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/samplesentry/BorderGuard$RobotData.class b/代码/robocode/robocode.samples/target/classes/samplesentry/BorderGuard$RobotData.class
deleted file mode 100644
index f771285..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/samplesentry/BorderGuard$RobotData.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/samplesentry/BorderGuard.class b/代码/robocode/robocode.samples/target/classes/samplesentry/BorderGuard.class
deleted file mode 100644
index 63c50b7..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/samplesentry/BorderGuard.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/samplesentry/BorderGuard.properties b/代码/robocode/robocode.samples/target/classes/samplesentry/BorderGuard.properties
deleted file mode 100644
index 4224bae..0000000
--- a/代码/robocode/robocode.samples/target/classes/samplesentry/BorderGuard.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-#Robot Properties
-#Sat May 25 22:15:07 EST 2013
-robot.description=\ A sample robot\n\n This is a robot that guards the borders of the battlefield\n\nUse it against \"wall crawlers\" like e.g. sample.Walls and sample.Corners
-robot.webpage=
-robocode.version=1.9.0.0
-robot.java.source.included=true
-robot.author.name=Flemming N. Larsen
-robot.classname=samplesentry.BorderGuard
-robot.name=BorderGuard
\ No newline at end of file
diff --git a/代码/robocode/robocode.samples/target/classes/sampleteam/MyFirstDroid.class b/代码/robocode/robocode.samples/target/classes/sampleteam/MyFirstDroid.class
deleted file mode 100644
index 08c123d..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleteam/MyFirstDroid.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleteam/MyFirstLeader.class b/代码/robocode/robocode.samples/target/classes/sampleteam/MyFirstLeader.class
deleted file mode 100644
index 6893272..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleteam/MyFirstLeader.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleteam/MyFirstTeam.team b/代码/robocode/robocode.samples/target/classes/sampleteam/MyFirstTeam.team
deleted file mode 100644
index f9878e8..0000000
--- a/代码/robocode/robocode.samples/target/classes/sampleteam/MyFirstTeam.team
+++ /dev/null
@@ -1,7 +0,0 @@
-#Robocode robot team
-#Sun Aug 20 23:26:53 EST 2006
-team.members=sampleteam.MyFirstLeader,sampleteam.MyFirstDroid,sampleteam.MyFirstDroid,sampleteam.MyFirstDroid,sampleteam.MyFirstDroid
-team.author.name=Mathew Nelson and Flemming N. Larsen
-robocode.version=1.1.2
-team.webpage=
-team.description=\ A sample team.\n MyFirstLeader scans for enemies,\n and orders the 4 droids to fire.
diff --git a/代码/robocode/robocode.samples/target/classes/sampleteam/Point.class b/代码/robocode/robocode.samples/target/classes/sampleteam/Point.class
deleted file mode 100644
index 8383bf0..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleteam/Point.class and /dev/null differ
diff --git a/代码/robocode/robocode.samples/target/classes/sampleteam/RobotColors.class b/代码/robocode/robocode.samples/target/classes/sampleteam/RobotColors.class
deleted file mode 100644
index 7a05bd6..0000000
Binary files a/代码/robocode/robocode.samples/target/classes/sampleteam/RobotColors.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/NoPackageButReallyLongNameIWouldSayTooLongMaybeEventLonger.class b/代码/robocode/robocode.tests.robots/target/classes/NoPackageButReallyLongNameIWouldSayTooLongMaybeEventLonger.class
deleted file mode 100644
index 3f231f0..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/NoPackageButReallyLongNameIWouldSayTooLongMaybeEventLonger.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/NoPackageShortName.class b/代码/robocode/robocode.tests.robots/target/classes/NoPackageShortName.class
deleted file mode 100644
index 3efee5a..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/NoPackageShortName.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/robocode/BadNamespace.class b/代码/robocode/robocode.tests.robots/target/classes/robocode/BadNamespace.class
deleted file mode 100644
index 24af7c0..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/robocode/BadNamespace.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/Ahead.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/Ahead.class
deleted file mode 100644
index 2b56990..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/Ahead.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/AwtAttack$1.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/AwtAttack$1.class
deleted file mode 100644
index ddc8eff..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/AwtAttack$1.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/AwtAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/AwtAttack.class
deleted file mode 100644
index b1d0e15..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/AwtAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BadFirePower.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BadFirePower.class
deleted file mode 100644
index 50d6cdf..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BadFirePower.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BattleLost.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BattleLost.class
deleted file mode 100644
index 7761605..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BattleLost.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BattleWin.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BattleWin.class
deleted file mode 100644
index a459112..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BattleWin.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BodyTurnRate.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BodyTurnRate.class
deleted file mode 100644
index 875ddb7..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/BodyTurnRate.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorAwtAttack$1.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorAwtAttack$1.class
deleted file mode 100644
index 59ec141..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorAwtAttack$1.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorAwtAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorAwtAttack.class
deleted file mode 100644
index b6aa527..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorAwtAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorHttpAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorHttpAttack.class
deleted file mode 100644
index 3f8067d..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorHttpAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorReflectionAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorReflectionAttack.class
deleted file mode 100644
index 82dac35..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorReflectionAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorSocketAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorSocketAttack.class
deleted file mode 100644
index d7fb04c..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorSocketAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorThreadAttack$Attacker.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorThreadAttack$Attacker.class
deleted file mode 100644
index efce3e5..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorThreadAttack$Attacker.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorThreadAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorThreadAttack.class
deleted file mode 100644
index 3eb54a7..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ConstructorThreadAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents$1.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents$1.class
deleted file mode 100644
index 90e6c59..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents$1.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents$2.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents$2.class
deleted file mode 100644
index 676a395..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents$2.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents$3.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents$3.class
deleted file mode 100644
index d30ba1c..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents$3.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents.class
deleted file mode 100644
index 127e4f3..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/CustomEvents.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DecelerationCaveat1.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DecelerationCaveat1.class
deleted file mode 100644
index b1cf7c3..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DecelerationCaveat1.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DecelerationCaveat2.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DecelerationCaveat2.class
deleted file mode 100644
index 490485c..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DecelerationCaveat2.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DecelerationCaveat3.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DecelerationCaveat3.class
deleted file mode 100644
index 77e46e5..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DecelerationCaveat3.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DieFast.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DieFast.class
deleted file mode 100644
index c9481cb..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/DieFast.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/EnvAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/EnvAttack.class
deleted file mode 100644
index 8cc691f..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/EnvAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/EventPriorityFilter.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/EventPriorityFilter.class
deleted file mode 100644
index 88d8192..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/EventPriorityFilter.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FairPlay.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FairPlay.class
deleted file mode 100644
index b329dc7..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FairPlay.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FileAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FileAttack.class
deleted file mode 100644
index b1a0d9a..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FileAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FileOutputStreamAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FileOutputStreamAttack.class
deleted file mode 100644
index 11c9c1d..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FileOutputStreamAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FileWriteSize.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FileWriteSize.class
deleted file mode 100644
index b5fd1e0..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/FileWriteSize.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/GunHeat.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/GunHeat.class
deleted file mode 100644
index abe3dfb..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/GunHeat.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/GunTurnRate.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/GunTurnRate.class
deleted file mode 100644
index 88a48cf..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/GunTurnRate.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/HttpAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/HttpAttack.class
deleted file mode 100644
index f4f7477..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/HttpAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/IncludeNamespaceAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/IncludeNamespaceAttack.class
deleted file mode 100644
index 6b37f60..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/IncludeNamespaceAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/InteruptibleEvent.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/InteruptibleEvent.class
deleted file mode 100644
index b09279c..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/InteruptibleEvent.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/JuniorEvents.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/JuniorEvents.class
deleted file mode 100644
index 35170da..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/JuniorEvents.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/MaxTurnRate.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/MaxTurnRate.class
deleted file mode 100644
index 9d2ae28..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/MaxTurnRate.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/MaxVelocity.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/MaxVelocity.class
deleted file mode 100644
index 88149cf..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/MaxVelocity.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/PrivateConstructor.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/PrivateConstructor.class
deleted file mode 100644
index f79a141..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/PrivateConstructor.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/RadarTurnRateAndSetAdjust.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/RadarTurnRateAndSetAdjust.class
deleted file mode 100644
index e314c5c..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/RadarTurnRateAndSetAdjust.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/Random.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/Random.class
deleted file mode 100644
index 12daa16..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/Random.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/RateControl.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/RateControl.class
deleted file mode 100644
index 92c9c50..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/RateControl.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ReflectionAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ReflectionAttack.class
deleted file mode 100644
index 63df30d..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ReflectionAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ReverseDirection.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ReverseDirection.class
deleted file mode 100644
index f739e85..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ReverseDirection.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/RobotDeathEvents.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/RobotDeathEvents.class
deleted file mode 100644
index 11a743a..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/RobotDeathEvents.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/SkipTurns.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/SkipTurns.class
deleted file mode 100644
index 436b949..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/SkipTurns.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/SocketAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/SocketAttack.class
deleted file mode 100644
index 50cbb72..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/SocketAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/TestTeam.team b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/TestTeam.team
deleted file mode 100644
index fd3a223..0000000
--- a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/TestTeam.team
+++ /dev/null
@@ -1,7 +0,0 @@
-#Robocode robot team
-#Sat Oct 25 22:23:58 CEST 2008
-team.members=sampleteam.MyFirstLeader,sampleteam.MyFirstDroid,sample.Fire
-team.author.name=
-robocode.version=unknown
-uuid=8abd63e8-1156-4fb4-a81f-eb10fca9596d
-team.description=testteam
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadAttack$Attacker.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadAttack$Attacker.class
deleted file mode 100644
index d262015..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadAttack$Attacker.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadAttack.class
deleted file mode 100644
index 380d973..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadGroupAttack$1.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadGroupAttack$1.class
deleted file mode 100644
index 7f72191..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadGroupAttack$1.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadGroupAttack.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadGroupAttack.class
deleted file mode 100644
index a4397c8..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/ThreadGroupAttack.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/TooLongNameThisIsReallyTooLongName.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/TooLongNameThisIsReallyTooLongName.class
deleted file mode 100644
index 1a7d3a4..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/TooLongNameThisIsReallyTooLongName.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/UndeadThread.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/UndeadThread.class
deleted file mode 100644
index 8777873..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/UndeadThread.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/WatchBullets.class b/代码/robocode/robocode.tests.robots/target/classes/tested/robots/WatchBullets.class
deleted file mode 100644
index 5689806..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tested/robots/WatchBullets.class and /dev/null differ
diff --git a/代码/robocode/robocode.tests.robots/target/classes/tooLongNamespaceThisIsReallyTooLongNamespace/TooLongNamespace.class b/代码/robocode/robocode.tests.robots/target/classes/tooLongNamespaceThisIsReallyTooLongNamespace/TooLongNamespace.class
deleted file mode 100644
index a623e0f..0000000
Binary files a/代码/robocode/robocode.tests.robots/target/classes/tooLongNamespaceThisIsReallyTooLongNamespace/TooLongNamespace.class and /dev/null differ
diff --git a/文档/软件需求规格说明书郭禹良版本0.3.doc b/文档/软件需求规格说明书郭禹良版本0.3.doc
deleted file mode 100644
index b0074b5..0000000
Binary files a/文档/软件需求规格说明书郭禹良版本0.3.doc and /dev/null differ
diff --git a/软件需求规格说明书.doc b/软件需求规格说明书.doc
deleted file mode 100644
index 1931f7f..0000000
Binary files a/软件需求规格说明书.doc and /dev/null differ