Example #1
0
        public bool TestingClone()
        {
            CardGame cg = actualgameiterator.game.Clone();

            if (!cg.Equals(actualgameiterator.game))
            {
                Console.WriteLine("Clone CardGame Not Equal -- Returning false"); return(false);
            }

            GameIterator g1 = new GameIterator(actualgameiterator.rules, cg, actualgameiterator.gameWorld, "blah", false);
            GameIterator g2 = actualgameiterator.Clone(cg);

            if (!g2.Equals(actualgameiterator))
            {
                Console.WriteLine("Clone GameIterator Not Equal -- Returning false"); return(false);
            }

            return(true);
        }
Example #2
0
        public bool TestCloneSecretClone()
        {
            CardGame cg     = actualgameiterator.game.CloneSecret(0);
            CardGame clone  = cg.Clone();
            CardGame clone2 = clone.Clone();

            if (clone.Equals(cg))
            {
                Console.WriteLine("Clonesecret equals Cloned CloneSecret");
            }
            else
            {
                Console.WriteLine("Clonesecret Clone fail");
            }
            if (clone2.Equals(clone))
            {
                Console.WriteLine("CloneSecret's Clone Clone equals CloneSecret's Clone");
            }
            return(true);
        }