Prim's algorithm is now working. Vertices now show if they are being
visited in a for each loop or are extracted from a list