package org.usfirst.team1699.test.simElectronics;

import java.util.HashMap;
import java.util.Map;

public class SimXboxController{
	private enum Button {A, B, X, Y, Back, Start, LSButton, RSButton, RBumper, LBumper};
	private enum State {Pressed, Released};
	private double rightStickValue;
	private double leftStickValue;
	private Map<Button, State> stateMap = new HashMap<>();

	public SimXboxController() {
		this.rightStickValue = 0;
		this.leftStickValue = 0;
	}
	
	public void setState(Button b, State s){
		stateMap.put(b, s);
	}
	
	public State getState(Button b){
		return stateMap.get(b);
	}
	
	public double getRightStickValue() {
		return rightStickValue;
	}
	
	public void setRightStickValue(double rightStickValue) {
		this.rightStickValue = rightStickValue;
	}

	public double getLeftStickValue() {
		return leftStickValue;
	}

	public void setLeftStickValue(double leftStickValue) {
		this.leftStickValue = leftStickValue;
	}

	public Map<Button, State> getStateMap() {
		return stateMap;
	}
}

@@ -216,16 +216,54 @@
 Bumper%7D;
+ //Available buttons on the controller
 %0D%0A%09priva
@@ -296,16 +296,44 @@
 leased%7D;
+ //Valid states for a button
 %0D%0A%09priva
@@ -350,32 +350,52 @@
 rightStickValue;
+ //Right stick value
 %0D%0A%09private doubl
@@ -411,16 +411,35 @@
 ckValue;
+ //Left stick value
 %0D%0A%09priva
@@ -487,16 +487,46 @@
 Map%3C%3E();
+ //Maps each button to a state
 %0D%0A%0D%0A%09pub
@@ -548,24 +548,49 @@
 roller() %7B%0D%0A
+%09%09//Sets values to zero%0D%0A
 %09%09this.right
@@ -604,16 +604,17 @@
 lue = 0;
+ 
 %0D%0A%09%09this
@@ -685,16 +685,53 @@
 te s)%7B%0D%0A
+%09%09//Sets state for a certain button%0D%0A
 %09%09stateM
@@ -787,16 +787,45 @@
 on b)%7B%0D%0A
+%09%09//Gets state for a button%0D%0A
 %09%09return
@@ -881,32 +881,64 @@
 StickValue() %7B%0D%0A
+%09%09//Gets value for right stick%0D%0A
 %09%09return rightSt
@@ -1010,24 +1010,56 @@
 ckValue) %7B%0D%0A
+%09%09//Sets value for right stick%0D%0A
 %09%09this.right

Update SimXboxController.java