public override string SecondStar() { var input = ReadLineInput(); var result = RoomEncryptor.SectorOf(RoomEncryptor.Decrypt(input)); return(result); }
public override string FirstStar() { var input = ReadLineInput(); var result = RoomEncryptor.CountCorrectRoomDescriptors(input); return(result.ToString()); }
public void SecondStarExample() { var encrypted = "qzmt-zixmtkozy-ivhz-343"; var decrypted = RoomEncryptor.Decrypt(encrypted); Assert.Equal("very-encrypted-name-343", decrypted); }
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); }