public void tick()
	{
//		x = randomX(xMin, xMax);
//		y = randomY(yMin, yMax);
		
//		System.out.println(xMin+"< "+x+" <"+(xMax+xMin)+"  ,  "+yMin+"< "+y+" <"+(yMax+yMin));
		
//		System.out.println("Vector("+vec.x+","+vec.y+")");
		
		if(hitMiddle())
		{
			vec.y *= -1;
			x = nextX();
			y = nextY();
		}
		
		// if the next move is within the bounds, move normally
		if(!isOutOfBounds(nextX(), nextY(), xMin, yMin, xMax, yMax))
		{
			x = nextX();
			y = nextY();
		}
		else
		{
			// if it hits a side, then flip the vector to make it bounce
			
			if(hitTop())
				vec.y *= -1;
			
			if(hitBottom())
				vec.y *= -1;
			
			if(hitRight())
				vec.x *= -1;
			
			if(hitLeft())
				vec.x *= -1;
			
			// move to next position after bouncing
			x = nextX();
			y = nextY();
		}
	}