コード例 #1
0
ファイル: CardCollection.cs プロジェクト: W3SS/cardstock
        public override bool Equals(System.Object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            CardCollection othercardcollection = obj as CardCollection;

            if (othercardcollection == null)
            {
                return(false);
            }

            if (owner.owner.GetType() != othercardcollection.owner.owner.GetType())
            {
                return(false);
            }

            if (owner.owner.id != othercardcollection.owner.owner.id)
            {
                return(false);
            }

            if (type != othercardcollection.type)
            {
                return(false);
            }

            if (!cards.SequenceEqual(othercardcollection.cards))
            {
                return(false);
            }

            return(true);
        }