Moved ray casting algorithm to Map as we can gain greater efficiency from knowing the geometry of the map