internal void Update(IEnumerable<Ship> rpShips)
{
var rSnapshots = new ListDictionary<Ship, int>();
foreach (var rShip in rpShips)
rSnapshots.Add(rShip, rShip.HP.Current);
if (r_Snapshots == null || !r_Snapshots.Keys.SequenceEqual(rpShips) || !r_Snapshots.Values.SequenceEqual(rpShips.Select(r => r.HP.Current)))
{
if (r_Snapshots != null)
foreach (var rShip in r_Snapshots.Keys.Except(rpShips))
rShip.UpdateAnchorageRepairStatus(false);
foreach (var rShip in rSnapshots.Keys)
{
rShip.UpdateAnchorageRepairStatus(true);
rShip.AnchorageRepairStatus.Update();
}
r_Snapshots = rSnapshots;
Reset();
}
}