public Maze(string name, int mazeHeight, int mazeLength, CharVals mazeVals) { this.name = name; this.mazeHeight = mazeHeight; this.mazeLength = mazeLength; this.mazeVals = mazeVals; }
/// <summary> /// constructor that creates a new maze for player one using dfs /// </summary> /// <param name="name"></param> /// <param name="mazeSize"></param> /// <param name="mazeVals"></param> public Game(string name, int mazeHeight, int mazeLength, CharVals mazeVals) { this.name = name; mazeOne = new Maze(name + "player1", mazeHeight, mazeLength, mazeVals); mazeOne.CreateMaze(new DFSMazeMaker()); mazeTwo = mazeOne.Clone(); mazeTwo.name = name + "player2"; ShiftStart(mazeOne, mazeTwo); }
/// <summary> /// gets printable graph's info /// </summary> /// <param name="start"></param> /// <param name="end"></param> /// <param name="mazeSize"></param> /// <param name="mazeVals"></param> /// <returns></returns> public string GetString(Node start, Node end, int mazeHeight, int mazeLength, CharVals mazeVals) { this.mazeHeight = mazeHeight; this.mazeLength = mazeLength; this.mazeVals = mazeVals; visualMazeArray = new char[mazeLength * 2, mazeHeight * 2]; TraverveNodes(start, start.location.col * 2, start.location.row * 2); //turns start and end into normal path values visualMazeArray[start.location.col * 2, start.location.row * 2] = mazeVals.pathValue; visualMazeArray[end.location.col * 2, end.location.row * 2] = mazeVals.pathValue; return(GetStringFromArray()); }