/// <summary>
        /// Initializes a new instance of the <see cref="BranchDeck"/> class.
        /// </summary>
        /// <param name="member">The member<see cref="LinkMember"/>.</param>
        /// <param name="value">The value<see cref="ICard{IFigure}"/>.</param>
        /// <param name="capacity">The capacity<see cref="int"/>.</param>
        public BranchDeck(LinkMember member, ICard <IFigure> value, int capacity) : base(capacity)
        {
            Member = member;
            var card = NewCard(value);

            UniqueKey = member.FigureLinkKey(value.Value);
            InnerAdd(card);
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Link"/> class.
 /// </summary>
 public Link()
 {
     Name      = Unique.NewKey.ToString() + "_L";
     UniqueKey = Name.UniqueKey64();
     Origin    = new LinkMember(this, LinkSite.Origin);
     Target    = new LinkMember(this, LinkSite.Target);
     Linker.Map.Links.Put(this);
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Link"/> class.
 /// </summary>
 /// <param name="origin">The origin<see cref="IFigures"/>.</param>
 /// <param name="target">The target<see cref="IFigures"/>.</param>
 public Link(IFigures origin, IFigures target)
 {
     Name      = origin.Type.Name + "_" + target.Type.Name;
     UniqueKey = Name.UniqueKey64();
     Origin    = new LinkMember(origin, this, LinkSite.Origin);
     Target    = new LinkMember(target, this, LinkSite.Target);
     origin.Linker.TargetLinks.Put(this);
     target.Linker.OriginLinks.Put(this);
     Linker.Map.Links.Put(this);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BranchDeck"/> class.
 /// </summary>
 /// <param name="member">The member<see cref="LinkMember"/>.</param>
 /// <param name="collections">The collections<see cref="IEnumerable{ICard{IFigure}}"/>.</param>
 /// <param name="capacity">The capacity<see cref="int"/>.</param>
 public BranchDeck(LinkMember member, IEnumerable <ICard <IFigure> > collections, int capacity = 7) : base(capacity)
 {
     Member = member;
     if (collections.Any())
     {
         var val  = collections.First();
         var card = NewCard(val);
         UniqueKey = member.FigureLinkKey(val.Value);
         InnerAdd(card);
     }
     foreach (var card in collections.Skip(1))
     {
         InnerAdd(card);
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BranchDeck"/> class.
 /// </summary>
 /// <param name="member">The member<see cref="LinkMember"/>.</param>
 /// <param name="linkkey">The linkkey<see cref="ulong"/>.</param>
 public BranchDeck(LinkMember member, ulong linkkey) : base(9)
 {
     Member    = member;
     UniqueKey = linkkey;
 }