Update puzzles passed / failed

This commit is contained in:
Tim Young 2018-10-05 12:53:38 -05:00
parent 00d78684a2
commit eec743d9c6

View File

@ -66,13 +66,23 @@ namespace EduNetworkBuilder
{ {
if (UserActions == null) return; if (UserActions == null) return;
NetworkAction NA = UserActions.GetCurrentNetAction(); NetworkAction NA = UserActions.GetCurrentNetAction();
if (NA != null) NA.SetPassed(); if (NA != null)
{
NA.SetPassed();
if (!PuzzlesPassed.Contains(NA.NetworkName)) PuzzlesPassed.Add(NA.NetworkName);
if (PuzzlesFailed.Contains(NA.NetworkName)) PuzzlesFailed.Remove(NA.NetworkName);
}
} }
public void RegisterReplayFailed() public void RegisterReplayFailed()
{ {
if (UserActions == null) return; if (UserActions == null) return;
NetworkAction NA = UserActions.GetCurrentNetAction(); NetworkAction NA = UserActions.GetCurrentNetAction();
if (NA != null) NA.SetFailed(); if (NA != null)
{
NA.SetFailed();
if (!PuzzlesFailed.Contains(NA.NetworkName)) PuzzlesFailed.Add(NA.NetworkName);
if (PuzzlesPassed.Contains(NA.NetworkName)) PuzzlesPassed.Remove(NA.NetworkName);
}
} }
public ActionCollection GetUserActionCollection() public ActionCollection GetUserActionCollection()
{ {