src/engine/systems/Accelerate.java
public void execute(double time) {
		for (int pid : this.getActives()) {
			Map<String,Component> activeComponents = this.getHandled().get(pid);

			XAcceleration ax = (XAcceleration) activeComponents.get(XAcceleration.KEY);
			YAcceleration ay = (YAcceleration) activeComponents.get(YAcceleration.KEY);
			XVelocity vx = (XVelocity) activeComponents.get(XVelocity.KEY);
			YVelocity vy = (YVelocity) activeComponents.get(YVelocity.KEY);

			vx.setData(vx.getData() + ax.getData()*time);
			vy.setData(vy.getData() + ay.getData()*time);

			if(vx.getData() < 0) ax.setData(Math.max(ax.getData(), 0));
			if(vx.getData() > 0) ax.setData(Math.min(ax.getData(), 0));
			
		}
	}
/**
     * Updates velocity values based on Acceleration component
     * 
     *  @param time	Update time for game loop
     */
Updates velocity values based on Acceleration component

@param time     Update time for game loop
Updates velocity values based on Acceleration component @param time Update time for game loop
public void execute(double time) {
		for (int pid : this.getActives()) {
			Map<String,Component> activeComponents = this.getHandled().get(pid);
			XAcceleration ax = (XAcceleration) activeComponents.get(XAcceleration.KEY);
			YAcceleration ay = (YAcceleration) activeComponents.get(YAcceleration.KEY);
			XVelocity vx = (XVelocity) activeComponents.get(XVelocity.KEY);
			YVelocity vy = (YVelocity) activeComponents.get(YVelocity.KEY);
			vx.setData(vx.getData() + ax.getData()*time);
			vy.setData(vy.getData() + ay.getData()*time);
			if(vx.getData() < 0) ax.setData(Math.max(ax.getData(), 0));
			if(vx.getData() > 0) ax.setData(Math.min(ax.getData(), 0));
		}
	}
public void execute ( double time ) { for ( int pid : this . getActives ( ) ) { Map < String , Component > activeComponents = this . getHandled ( ) . get ( pid ) ; XAcceleration ax = ( XAcceleration ) activeComponents . get ( XAcceleration . KEY ) ; YAcceleration ay = ( YAcceleration ) activeComponents . get ( YAcceleration . KEY ) ; XVelocity vx = ( XVelocity ) activeComponents . get ( XVelocity . KEY ) ; YVelocity vy = ( YVelocity ) activeComponents . get ( YVelocity . KEY ) ; vx . setData ( vx . getData ( ) + ax . getData ( ) * time ) ; vy . setData ( vy . getData ( ) + ay . getData ( ) * time ) ; if ( vx . getData ( ) < 0 ) ax . setData ( Math . max ( ax . getData ( ) , 0 ) ) ; if ( vx . getData ( ) > 0 ) ax . setData ( Math . min ( ax . getData ( ) , 0 ) ) ; } }
Updates velocity values based on Acceleration component
Updates velocity values based on Acceleration component