Update galaxy.cpp

Neil Logan, Galaxy test.

Here I used a loop that each time adds a star to a list of possible paths which are stored in a queue using a breadth first search (BFS). Due to the nature of a BFS, when the target star is reached it is automatically (one of) the shortest path. The path at the front of the queue is checked on each iteration.

One limitation of my implementation is if there is no route from A to B my program will not not exit the loop or return a value.