// Path: core/src/event/ControllerChangeEvent.java
// public class ControllerChangeEvent extends Event {
// 
// 	private final int index;
// 
// 	public ControllerChangeEvent(int ctrlIndex) {
// 		this.index = ctrlIndex;
// 	}
// 
// 	public int getControllerIndex() {
// 		return index;
// 	}
// }


import event.ControllerChangeEvent;
import event.EventManager;
import geometry.geom2d.Point2D;
import java.util.logging.Logger;
import model.CommandManager;
import com.jme3.input.InputManager;
import com.jme3.input.KeyInput;
import com.jme3.input.controls.KeyTrigger;
import com.jme3.input.controls.MouseButtonTrigger;
import controller.InputInterpreter;

		inputManager.addMapping(MOVE_ATTACK, new KeyTrigger(KeyInput.KEY_A));
		inputManager.addMapping(MULTIPLE_SELECTION, new KeyTrigger(KeyInput.KEY_LCONTROL),
				new KeyTrigger(KeyInput.KEY_RCONTROL));
		inputManager.addMapping(HOLD, new KeyTrigger(KeyInput.KEY_H));
		inputManager.addMapping(PAUSE, new KeyTrigger(KeyInput.KEY_SPACE));

		inputManager.addListener(this, mappings);

		logger.info("battlefield controller online");
	}

	@Override
	protected void unregisterInputs(InputManager inputManager) {
		for (String s : mappings) {
			if (inputManager.hasMapping(s)) {
				inputManager.deleteMapping(s);
			}
		}
		inputManager.removeListener(this);
	}

	@Override
	public void onAnalog(String name, float value, float tpf) {
	}

	@Override
	public void onAction(String name, boolean isPressed, float tpf) {
		if (!isPressed) {
			switch (name) {
				case SWITCH_CTRL_1:

// Path: core/src/event/ControllerChangeEvent.java
// public class ControllerChangeEvent extends Event {
// 
// 	private final int index;
// 
// 	public ControllerChangeEvent(int ctrlIndex) {
// 		this.index = ctrlIndex;
// 	}
// 
// 	public int getControllerIndex() {
// 		return index;
// 	}
// }


// Path: core/src/controller/battlefield/BattlefieldInputInterpreter.java
import event.ControllerChangeEvent;
import event.EventManager;
import geometry.geom2d.Point2D;
import java.util.logging.Logger;
import model.CommandManager;
import com.jme3.input.InputManager;
import com.jme3.input.KeyInput;
import com.jme3.input.controls.KeyTrigger;
import com.jme3.input.controls.MouseButtonTrigger;
import controller.InputInterpreter;

		inputManager.addMapping(MOVE_ATTACK, new KeyTrigger(KeyInput.KEY_A));
		inputManager.addMapping(MULTIPLE_SELECTION, new KeyTrigger(KeyInput.KEY_LCONTROL),
				new KeyTrigger(KeyInput.KEY_RCONTROL));
		inputManager.addMapping(HOLD, new KeyTrigger(KeyInput.KEY_H));
		inputManager.addMapping(PAUSE, new KeyTrigger(KeyInput.KEY_SPACE));

		inputManager.addListener(this, mappings);

		logger.info("battlefield controller online");
	}

	@Override
	protected void unregisterInputs(InputManager inputManager) {
		for (String s : mappings) {
			if (inputManager.hasMapping(s)) {
				inputManager.deleteMapping(s);
			}
		}
		inputManager.removeListener(this);
	}

	@Override
	public void onAnalog(String name, float value, float tpf) {
	}

	@Override
	public void onAction(String name, boolean isPressed, float tpf) {
		if (!isPressed) {
			switch (name) {
				case SWITCH_CTRL_1:

					EventManager.post(new ControllerChangeEvent(0));
