@Override
	public void act()
	{
		// Removes the dead handleds
		removeDeadHandleds();
		
		// Checks collisions between all the listeners and collidables
		for (int listenerind = 0; listenerind < getHandledNumber(); listenerind++)
		{
			// Remembers the important data about the listener
			CollisionListener listener = getCollisionListener(listenerind);
			
			// Inactive listeners are not counted
			if (!listener.isActive())
				continue;
			
			DoublePoint[] colpoints = listener.getCollisionPoints();
			HashMap<Collidable, ArrayList<DoublePoint>> collidedpoints = 
					new HashMap<Collidable, ArrayList<DoublePoint>>();
			
			for (int colind = 0; 
					colind < this.collidablehandler.getHandledNumber(); colind++)
			{
				// Remembers the collidable
				Collidable c = this.collidablehandler.getCollidable(colind);
				
				// Non-solid collidables cannot collide
				if (!c.isSolid())
					continue;
				
				// Listener cannot collide with itself
				if (listener.equals(c))
					continue;
				
				// Checks all points if they would collide
				for (int pointi = 0; pointi < colpoints.length; pointi++)
				{
					Collidable collider = c.pointCollides((int) colpoints[pointi].getX(), 
							(int) colpoints[pointi].getY());
					
					if (collider == null)
						continue;

					// The arraylist may need to be initialized
					if (!collidedpoints.containsKey(collider))
						collidedpoints.put(collider, new ArrayList<DoublePoint>());
					// Remembers the point and the collided object
					collidedpoints.get(collider).add(colpoints[pointi]);
				}
			}
			
			// Informs the listener about each object it collided with
			for (Collidable c: collidedpoints.keySet())
				listener.onCollision(collidedpoints.get(c), c);
		}
	}