Added a function to create a graph from a list of Locations

I just stuck it in Player.java; it didn't seem worth putting it elsewhere.