26 lines
665 B
C#
26 lines
665 B
C#
using Cursach.Realisations;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using ProtoBuf;
|
|
|
|
namespace Cursach.States;
|
|
|
|
[ProtoContract]
|
|
[Serializable]
|
|
public class State()
|
|
{
|
|
[ProtoMember(1)] public List<Node> visited = [];
|
|
[ProtoMember(2)] public List<Node> queue = [];
|
|
[ProtoMember(3)] public AdjacencyList AdjacencyList = new();
|
|
public bool IsCompleted => !queue.Any();
|
|
|
|
public State(AdjacencyList adjacencyList, List<Node> visited, List<Node> queue) : this()
|
|
{
|
|
this.visited = visited;
|
|
this.queue = queue;
|
|
AdjacencyList = adjacencyList;
|
|
}
|
|
} |