Files
basic-computer-games/75_Roulette/csharp/Slot.cs
2023-02-16 12:22:59 +11:00

19 lines
406 B
C#

using System.Collections.Immutable;
namespace Roulette;
internal class Slot
{
private readonly ImmutableHashSet<BetType> _coveringBets;
public Slot (string name, params BetType[] coveringBets)
{
Name = name;
_coveringBets = coveringBets.ToImmutableHashSet();
}
public string Name { get; }
public bool IsCoveredBy(Bet bet) => _coveringBets.Contains(bet.Type);
}