public static int CostToEnter( this MapUnit unit, HexCoords loc) { if (!map.InBounds(loc)) { return(10000); } else { return(unit.CostToEnter(map[loc])); } }