public int CountVulnerableBirdHunter() { Birds birds = new Birds(); string[] source = GetText().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); var matchQuery = from word in source where word.ToLowerInvariant() == birds.getVulnerableBirdHunter().ToLowerInvariant() select word; int birdCount = matchQuery.Count(); int count = birdCount + 200 + 400 + 800 + 1600; return(count); }
public int CountInvincibleBirdHunter() { Birds birds = new Birds(); string[] source = GetText().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); var matchQuery = from word in source where word.ToLowerInvariant() == birds.getInvincibleBirdHunter().ToLowerInvariant() select word; int birdCount = matchQuery.Count(); int lifeCount = birdCount - 5; return(lifeCount); }
public int CountOrange_BelliedParrot() { Birds birds = new Birds(); string[] source = GetText().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); var matchQuery = from word in source where word.ToLowerInvariant() == birds.getOrange_BelliedParrot().ToLowerInvariant() select word; int birdCount = matchQuery.Count(); int count = birdCount * 5000; return(count); }
public void Run() { Birds birds = new Birds(); Console.WriteLine($"Bird score count: {birds.CountBird()}"); Console.WriteLine($"Crested Ibis score count: {birds.CountCrestedIbis()}"); Console.WriteLine($"Great Kiskudee score count: {birds.CountGreatKiskudee()}"); Console.WriteLine($"Red-Necked Phalarope score count: {birds.CountRed_NeckedPhalarope()}"); Console.WriteLine($"Red Crossbill score count: {birds.CountRedCrossbill()}"); Console.WriteLine($"Evening Grosbeak score count: {birds.CountEveningGrosbeak()}"); Console.WriteLine($"Greater Prairie Chicken score count: {birds.CountGreaterPrairieChicken()}"); Console.WriteLine($"Iceland Gull score count: {birds.CountIcelandGull()}"); Console.WriteLine($"Orange-Bellied Parrot score count: {birds.CountOrange_BelliedParrot()}"); Console.WriteLine($"Vulnerable Bird Hunter count: {birds.CountVulnerableBirdHunter()}"); Console.WriteLine($"Invincible Bird Hunter count: {birds.CountInvincibleBirdHunter()}"); //birds.Score = CountBird() + CountCrestedIbis() + CountGreatKiskudee() + CountRedCrossbill() + CountRed_NeckedPhalarope() + CountEveningGrosbeak() + CountGreaterPrairieChicken() + CountIcelandGull() + CountOrange_BelliedParrot(); //birds.Lives = CountInvincibleBirdHunter(); //Console.WriteLine("\n"); birds.PrintScoreBoard(); Console.WriteLine("Press any key to exit."); Console.ReadKey(); }