class cVector2D
{
	public float x;
	public float y;

	// constructor
	public void cVector2D(float x, float y)
	{
		this.x = x;
		this.y = y;
	}

	// add another cVector2D to this one
	public void add(cVector2D v2)
	{
		this.x += v2.x;
		this.y += v2.y;
	}
} 

class cGameObject
{
	public cVector2D vPosition;
	public cVector2D vVelocity;

	// constructor - give the object a position and initial velocity
	public void cGameObject(cVector2D pos, cVector2D vel)
	{
		this.vPosition = pos;
		this.vVelocity = vel;
	}

	// a simple add velocity to position function
	public void objAddVelocity()
	{
		// the cool thing is you can add other vector forces too like world physics or colision forces
		// gravity and wind for example...
		cVector2D vGravity = new cVector2D(0.0f, 98.1f); // you wouldn't create these here everytime normally!
		cVector2D vWind = new cVector2D(20.0f, 0.0f);
		// add forces to velocity		
		vVelocity.add(vGravity); // add gravity force to current velocity 
		vVelocity.add(vWind);	 // add wind too 

		vPosition.add(vVelocity); // add the current velocity to the object's position		
	}
} 