Commit for DE

This commit is contained in:
LivelyPuer 2024-05-22 00:02:04 +04:00
parent 204aea50c1
commit 69ad981e94

View File

@ -29,6 +29,14 @@ public class BFS
{ {
return new State(adjacencyList, new List<Node>(visited), new List<Node>(queue)); return new State(adjacencyList, new List<Node>(visited), new List<Node>(queue));
} }
public void SetState(State state)
{
adjacencyList = state.AdjacencyList;
visited = state.visited;
queue = new Queue<Node>(state.queue);
}
public bool Step() public bool Step()
{ {