Ejemplo n.º 1
0
 public static void representSnapMap(Map map)
 {
     for(int i = 0; i < map.height; ++i)
     {
         string line = "";
         for(int j = 0; j < map.width; ++j)
         {
             line += map.snapij(i, j) ? "#" : " ";
         }
         Console.WriteLine(line);
     }
 }
Ejemplo n.º 2
0
 public static void representClearance(Map map)
 {
     List<int> clearancemap = map.clearancemap;
     for (int i = 0; i < map.height; ++i)
     {
         string line = "";
         for (int j = 0; j < map.width; ++j)
         {
             line += fixStrSize(Convert.ToString(map.clearij(i, j, clearancemap)), 2);
         }
         Console.WriteLine(line);
     }
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            List<Double> doublemap = Tools.parseCSVmap("../../map.csv");
            Map m = new Map(4,4, doublemap);
            IEnumerable<bool> l = m.probamap.Select(x => x > 0.5);
            Console.WriteLine(m.snapmap[0]);
            Console.WriteLine(m.snapmap[12]);
            m.setij(0, 0, 0.9);
            Console.WriteLine(m.snapmap[0]);
            Console.WriteLine(m.snapij(0,0));

            Tools.representSnapMap(m);
            Tools.representClearance(m);

            Console.Write("Press any key...");
            Console.ReadKey();
        }
Ejemplo n.º 4
0
 public PathFinder(Map m)
 {
     map = m;
 }