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(); }
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))); } } }
public Cell(Labyrinth parent, Cord pos) { this.parent = parent; Pos = pos; }
public Cell GetCell(Cord pos) { return(GetCell(pos.X, pos.Y)); }
public Labyrinth(Cord sizei, Cord start, Cord end) : this(sizei.X, sizei.Y) { Start = start; End = end; GenaratePath(); }
public bool Equals(Cord cord) { return(this.X.Equals(cord.X) && this.Y.Equals(cord.Y)); }