Exemplo n.º 1
0
        public override string ToString()
        {
            List <string> stats = new List <string>();

            stats.Add(Environment.NewLine);
            stats.Add("==== Maze name : " + MazeType.ToString() + " ====");
            stats.Add("- maze conversion time : " + ConvertingImageToBoolArrayTime.ToString("mm':'ss'.'fff"));
            stats.Add("- size : " + MazeSize.Width + "x" + MazeSize.Height + "px (" + MazeSize.Width * MazeSize.Height + "px)");
            stats.Add("- corridor : " + CorridorSpaces + " (" + MazeProportionOfCorridor.ToString() + "% of maze size)");
            stats.Add("**** Tree ****");
            stats.Add("- number of cells : " + TreeNumberOfCells + " (" + 100 * TreeNumberOfCells / CorridorSpaces + "% of corridor)");
            stats.Add("- build time : " + TreeBuildTime.ToString("mm':'ss'.'fff"));
            stats.Add("- image building time : " + TreeImageBuildTime.ToString("mm':'ss'.'fff"));
            stats.Add("**** Solvers ****");
            foreach (SolverStats solverStats in SolverStats)
            {
                stats.Add("---- Solver : " + solverStats.SolverType + " ----");
                stats.Add("- number of nodes : " + solverStats.NumberOfNodeInSolution);
                stats.Add("- path length : " + solverStats.PathLength);
                stats.Add("- solving time : " + solverStats.SolvingTime.ToString("mm':'ss'.'fff"));
                stats.Add("- image build time : " + solverStats.ResultImageBuildTime.ToString("mm':'ss'.'fff"));
            }

            return(string.Join(Environment.NewLine, stats));
        }
Exemplo n.º 2
0
    //void SaveSequenceStep()
    //{
    //    SequenceStep step = new SequenceStep();
    //    step.w = int.Parse(uiManager.inputWidth.text);
    //    step.h = int.Parse(uiManager.inputHeight.text);
    //    step.startPos = startPoint.position;
    //    step.endPos = endPoint.position;

    //    if (uiManager.toggleMaze[0].isOn)
    //    {
    //        step.maze = 1;
    //    }
    //    else if (uiManager.toggleMaze[1].isOn)
    //    {
    //        step.maze = 2;

    //    }
    //    else if (uiManager.toggleMaze[2].isOn)
    //    {
    //        step.maze = 3;
    //    }

    //    if (uiManager.togglePath[0].isOn)
    //    {
    //        step.path = 1;
    //    }
    //    else if (uiManager.togglePath[1].isOn)
    //    {
    //        step.path = 2;

    //    }
    //    else if (uiManager.togglePath[2].isOn)
    //    {
    //        step.path = 3;
    //    }

    //    sequence.Add(step);
    //}

    string GetImageName(MazeType maze, PathType path, int size)
    {
        string name = string.Format("{0}_{1}_{2}x{2}.png", maze.ToString(), path.ToString(), size);

        Debug.Log(name);
        return(name);
    }