private synchronized void moveEnts()
  {
    float time = 1.0f;
    //apply constant forces   
    do
    {
      float tMin = time;
      for (int i = 0; i < main.living.size(); i++) 
    {
      Ball s = main.living.get(i);
      for (int y = 0;y < main.lines.size();y++)
      {
        
        ObstacleLine l = main.lines.get (y);
          //There is a little gap that balls can get into
        s.intersect (l,tMin);
           if (s.getEarliestCollisionResponse().getTime() < tMin)
           {
             tMin = s.getEarliestCollisionResponse().getTime();
           }
      }
      for (int y = 0;y < main.pseudoPaddles.size();y++)
      {
        PseudoPaddle p = main.pseudoPaddles.get (y);
        s.intersect (p,tMin);
           if (s.getEarliestCollisionResponse().getTime() < tMin)
           {
             tMin = s.getEarliestCollisionResponse().getTime();
           }
      }
      for (int c = 0; c < main.buttons.size();c++)
      {
        ButtonObstacle b = main.buttons.get (c);
        s.intersect (b,tMin);
        if (s.getEarliestCollisionResponse().getTime() < tMin)
        {
             tMin = s.getEarliestCollisionResponse().getTime();
        }
      }
      s.update (tMin);
        for (PseudoPaddle p : main.pseudoPaddles)
        {
          p.updatePos (p.getX() + p.getMoveSpeed() *tMin);
        }
      }
    time -= tMin;
    } while (time > 1e-2f);
  }