Пример #1
0
        public JObject GenerateMaze(string name, int rows, int cols)
        {
            Maze    maze = model.GenerateMaze(name, rows, cols);
            JObject obj  = JObject.Parse(maze.ToJSON());

            return(obj);
        }
Пример #2
0
        public void VM_GenerateMaze()
        {
            string str  = model.GenerateMaze();
            Maze   maze = Maze.FromJSON(str);

            VM_MazeName   = maze.Name;
            VM_MazeRows   = maze.Rows;
            VM_MazeCols   = maze.Cols;
            VM_MazeString = str;
            VM_InitialPos = maze.InitialPos;
            VM_GoalPos    = maze.GoalPos;
        }