示例#1
0
        public override string SecondStar()
        {
            var input  = ReadLineInput();
            var result = RoomEncryptor.SectorOf(RoomEncryptor.Decrypt(input));

            return(result);
        }
示例#2
0
        public override string FirstStar()
        {
            var input  = ReadLineInput();
            var result = RoomEncryptor.CountCorrectRoomDescriptors(input);

            return(result.ToString());
        }
示例#3
0
        public void SecondStarExample()
        {
            var encrypted = "qzmt-zixmtkozy-ivhz-343";

            var decrypted = RoomEncryptor.Decrypt(encrypted);

            Assert.Equal("very-encrypted-name-343", decrypted);
        }
示例#4
0
        public void FirstStarExample()
        {
            var count = RoomEncryptor.CountCorrectRoomDescriptors(new[]
            {
                "aaaaa-bbb-z-y-x-123[abxyz]",
                "a-b-c-d-e-f-g-h-987[abcde]",
                "not-a-real-room-404[oarel]",
                "totally-real-room-200[decoy]",
            });

            Assert.Equal(123 + 987 + 404, count);
        }