mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-07 02:24:33 -08:00
Split out play resolution
This commit is contained in:
12
07_Basketball/csharp/Defense.cs
Normal file
12
07_Basketball/csharp/Defense.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Basketball;
|
||||
|
||||
internal class Defense
|
||||
{
|
||||
private float _value;
|
||||
|
||||
public Defense(float value) => Set(value);
|
||||
|
||||
public void Set(float value) => _value = value;
|
||||
|
||||
public static implicit operator float(Defense defense) => defense._value;
|
||||
}
|
||||
Reference in New Issue
Block a user