mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-23 07:29:02 -08:00
Encapsulate shot number and name
This commit is contained in:
8
07_Basketball/csharp/IRandomExtensions.cs
Normal file
8
07_Basketball/csharp/IRandomExtensions.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Games.Common.Randomness;
|
||||
|
||||
namespace Basketball;
|
||||
|
||||
internal static class IRandomExtensions
|
||||
{
|
||||
internal static Shot NextShot(this IRandom random) => Shot.Get(random.NextFloat(1, 3.5f));
|
||||
}
|
||||
Reference in New Issue
Block a user