src/Person.java
/**
	 * test if collided
	 *
	 * @param p the person to test the collision with
	 * @return true if collided with the other person, false if otherwise
	 */
test if collided
@param p the person to test the collision with
@return true if collided with the other person, false if otherwise
test if collided @param p the person to test the collision with @return true if collided with the other person false if otherwise
public boolean collided(Person p) {
		double dist = Math.sqrt(Math.pow(getNextX() - p.getNextX(), 2) + Math.pow(getNextY() - p.getNextY(), 2));
		boolean collided = (dist < size / 2.0 + p.getSize() / 2.0);
		if (collided && state == State.HEALTHY && (p.getState() == State.SICK || p.getState() == State.HOSPITALIZE))
			if (Math.random() < probSick)
				setSick(); 
		return collided;
	}
public boolean collided ( Person p ) { double dist = Math . sqrt ( Math . pow ( getNextX ( ) - p . getNextX ( ) , 2 ) + Math . pow ( getNextY ( ) - p . getNextY ( ) , 2 ) ) ; boolean collided = ( dist < size / 2.0 + p . getSize ( ) / 2.0 ) ; if ( collided && state == State . HEALTHY && ( p . getState ( ) == State . SICK || p . getState ( ) == State . HOSPITALIZE ) ) if ( Math . random ( ) < probSick ) setSick ( ) ; return collided ; }
test if collided
 @param p the person to test the collision with
 @return true if collided with the other person, false if otherwise
test if collided @param p the person to test the collision with @return true if collided with the other person false if otherwise
// make sick