예제 #1
0
        private void ComputeDFSPath()
        {
            DFS dfs = new DFS(m_graph);

            dfs.Start(Start, End);
            ResetTilemap();
            DisplayPath(dfs.Execute());
        }
예제 #2
0
 public Grid(Texture2D texture, int _gridSize, GameState gameState, SpriteFont _text, int _simSpeed, Algorithms _selected)
 {
     tex               = texture;
     gridSize          = _gridSize;
     text              = _text;
     nodes             = new Node[_gridSize, _gridSize];
     this.gameState    = gameState;
     simSpeed         /= _simSpeed;
     selectedAlgorithm = _selected;
     currentSetupState = SetupStateSequence.SETUPSTART;
     ConstructGrid();
     aStar    = new AStar(this);
     bfs      = new BFS(this);
     dfs      = new DFS(this);
     dijkstra = new Dijkstra(this);
 }