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.
Is this debugging code that you've left in? Can you remove before merging?