package common;

/**
 * State of the elevator motor.
 */
public enum Motor {
	UP,
	DOWN,
	STOPPED;

	/**
	 * Gets a motor enum value given a direction
	 * @param direction
	 * @return
	 */
	public static Motor mapMotor(Direction direction) {
		if (direction == Direction.UP) {
			return UP;
		} else if (direction == Direction.DOWN) {
			return DOWN;
		}
		return null;
	}
}
