Created
May 11, 2022 11:51
-
-
Save JasonBock/9dfe8aeef2b84b6e913dd1b9aa3b2146 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ModernGolfer | |
: IModernDriver<ModernGolfer> | |
{ | |
public static void Drive(IEnumerable<ModernGolfer> modernGolfers) | |
{ | |
foreach(var modernGolfer in modernGolfers) | |
{ | |
modernGolfer.Drive(); | |
} | |
} | |
public void Drive() | |
{ | |
var value = RandomNumberGenerator.GetInt32(100, 150); | |
Console.WriteLine($"Club head speed: {value} MPH"); | |
} | |
public void Stop() | |
{ | |
var value = RandomNumberGenerator.GetInt32(250, 320); | |
Console.WriteLine($"{value} yards"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment