Skip to content

Instantly share code, notes, and snippets.

@JasonBock
Created May 11, 2022 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JasonBock/9dfe8aeef2b84b6e913dd1b9aa3b2146 to your computer and use it in GitHub Desktop.
Save JasonBock/9dfe8aeef2b84b6e913dd1b9aa3b2146 to your computer and use it in GitHub Desktop.
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