Пример #1
0
        static void Main(string[] args)
        {
            Cord      size  = new Cord(26, 26);
            Cord      start = new Cord(0, 0);
            Cord      end   = new Cord(25, 25);
            Labyrinth lab   = new Labyrinth(size, start, end);

            Console.ReadKey();
        }
Пример #2
0
 public Labyrinth(int x, int y)
 {
     Size  = new Cord(x, y);
     cells = new Cell[Size.X, Size.Y];
     for (int i = 0; i < Size.X; i++)
     {
         for (int j = 0; j < Size.Y; j++)
         {
             SetCell(new Cell(this, new Cord(i, j)));
         }
     }
 }
Пример #3
0
 public Cell(Labyrinth parent, Cord pos)
 {
     this.parent = parent;
     Pos         = pos;
 }
Пример #4
0
 public Cell GetCell(Cord pos)
 {
     return(GetCell(pos.X, pos.Y));
 }
Пример #5
0
 public Labyrinth(Cord sizei, Cord start, Cord end) : this(sizei.X, sizei.Y)
 {
     Start = start;
     End   = end;
     GenaratePath();
 }
Пример #6
0
 public bool Equals(Cord cord)
 {
     return(this.X.Equals(cord.X) && this.Y.Equals(cord.Y));
 }