Get network equals func working & plug it into networkbuilder

This commit is contained in:
2018-03-17 09:38:15 -05:00
parent b4db7cf99c
commit e1060523ab
2 changed files with 53 additions and 1 deletions

View File

@ -243,7 +243,8 @@ namespace EduNetworkBuilder
public void StoreNetworkState(Network toStore)
{
//We should verify something has changed before storing it. Oh well...
if (storedNetworkStates.Count > 0 && toStore.Equals(storedNetworkStates[0]))
return; //The states are identical. Do not store this state.
storedNetworkStates.Insert(0,Network.DeepClone(toStore));
int maxCount = 30;
if(storedNetworkStates.Count > maxCount)