ParticleElement extends Region { public Boolean isDead(double pointX, double pointY) { return location.getX() < 0 || location.getY() < 0 || location.getX() > pointX || location.getY() > pointY; } ParticleElement(ParticleVector location, ParticleVector velocity,
            double width, double height, Image image); void move(); void display(); void age(); ParticleVector getLocation(); Image getTexture(); Boolean isDead(double pointX, double pointY); boolean isDead(int deathTime); @Override boolean isResizable();  }
@Test public void testIsDeadBounds() { ParticleElement particle = new ParticleElement( new ParticleVector(10, 10), new ParticleVector(1, 1), 20, 20, null); Assert.assertTrue(particle.isDead(1, 1)); Assert.assertTrue(!particle.isDead(20, 20)); particle = new ParticleElement( new ParticleVector(-10, 1), new ParticleVector(1, 1), 20, 20, null); Assert.assertTrue(particle.isDead(1, 1)); particle = new ParticleElement( new ParticleVector(1, -1), new ParticleVector(1, 1), 20, 20, null); Assert.assertTrue(particle.isDead(1, 1)); particle = new ParticleElement( new ParticleVector(2, 1), new ParticleVector(1, 1), 20, 20, null); Assert.assertTrue(particle.isDead(1, 1)); particle = new ParticleElement( new ParticleVector(1, 2), new ParticleVector(1, 1), 20, 20, null); Assert.assertTrue(particle.isDead(1, 1)); }