public void fillPolygon(Graphics g)
    {
        Tree<Point> used = new Tree<>(new VertexComparator());
        LinkedList<Vertex> vlist = vertices.getVertices().toLinkedList();
        while (vlist.hasNext())
        {
            Vertex v = vlist.getNext();
            if (v.getClass() != Point.class)    continue;
            Point p = (Point)v;
            if (used.contains(p)) continue;
            
            LinkedList<Integer> x = new LinkedList<>();
            LinkedList<Integer> y = new LinkedList<>();
            if (!retrieveCoordinatesFromPolygon(p, x, y, used))
                continue;
            
            g.setColor((vertices.shapeIsWall(p)) ? Color.PINK : Color.WHITE);
            g.fillPolygon( convertLinkedListToArray(x),
                            convertLinkedListToArray(y),
                            x.size());
        }
    }