public bool addParticle(Particle p) { if (occupying.Count == 0) { occupying.Add(p); return true; } if (occupying.Count < maxThroughput && p.speed >= occupying[occupying.Count - 1].speed) { occupying.Add(p); return true; } return false; }
public void removeParticle(Particle p) { occupying.Remove(p); }