refactoring to improve path finding. moved path map to the player, so that it can be kept and later updated