Exemple #1
0
        private static void SerializationChecks()
        {
            Cell   testCell = new Cell();
            string c        = testCell.Serialize();
            Cell   reco     = new Cell(c);
            string rc       = reco.Serialize();

            Console.WriteLine(testCell.BitsAsString());
            Console.WriteLine(reco.BitsAsString());
            Debug.Assert(testCell.HumanReadableCell() == reco.HumanReadableCell());

            Hunter testHunter    = new Hunter(3, 3);
            String test          = testHunter.Serialize();
            Hunter reconstituted = new Hunter(test);

            testHunter.ErrorCheck();
            reconstituted.ErrorCheck();
            Debug.Assert(testHunter.HumanReadableHunter == reconstituted.HumanReadableHunter);
        }