static void Main(string[] args) { var mag = new List <string>() { "give", "me", "one", "grand", "today", "night" }; var note = new List <string>() { "give", "one", "grand", "today" }; var canNote = RansomNote.CanMakeNote(mag, note); Console.WriteLine($"Can Note? {canNote}"); var mag2 = new List <string>() { "two", "times", "three", "is", "not", "four" }; var note2 = new List <string>() { "two", "times", "two", "is", "four" }; var canNote2 = RansomNote.CanMakeNote(mag2, note2); Console.WriteLine($"Can Note? {canNote2}"); }
public void CheckMagazine() { var(numberMagazine, numberNote) = _stdin.NumberOfWords(); var magazine = _stdin.Magazine(); var note = _stdin.Note(); CheckIfTotalWordsMatchesSentence(magazine, numberMagazine); CheckIfTotalWordsMatchesSentence(note, numberNote); var ransomNote = new RansomNote(magazine, note); var response = ransomNote.IsValid ? "Yes" : "No"; _stdout.Display(response); }