/// <summary> /// Called after the deck has ben deserialized. /// </summary> public virtual void Rehydrated() { Known.AddRange(DrawPile); Known.AddRange(DiscardPile); Known.AddRange(Table); Known.AddRange(Tableau); Hands.Apply(h => Known.AddRange(h)); }
/// <summary> /// How to handle rehydration from being serialized. /// </summary> public override void Rehydrated() { base.Rehydrated(); DrawPile.Apply(c => c.Options = CardOptions); DiscardPile.Apply(c => c.Options = CardOptions); Table.Apply(c => c.Options = CardOptions); Tableau.Apply(c => c.Options = CardOptions); Hands.Apply(h => h.Apply(c => c.Options = CardOptions)); }