private static void AddFish(FishRegister myFishRegister, string fisher, Fish fish, Location location) { Fisherman fisherMan = myFishRegister.Fishers.Find(x => x.Name == fisher); if (fisherMan != null) { myFishRegister.FishingEventList.Add(new FishingEvent(fisherMan, fish, location)); } else { Console.WriteLine("Fisher can't be found. Typo in the name?"); } Console.WriteLine($"{fisherMan.Name} got a new fish!"); Console.WriteLine(fish.ToString()); Console.WriteLine(location.ToString() + "\n"); }
public FishingEvent(Fisherman fisherman, Fish fish, Location location) { Fisher = fisherman; Fish = fish; Location = location; }
private static void AddFisher(FishRegister myFishRegister, Fisherman fisher) { myFishRegister.Fishers.Add(fisher); Console.WriteLine($"Fisher {fisher.Name} added into the Fishregister.\n"); }