mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-23 15:37:51 -08:00
19 lines
406 B
C#
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);
|
|
}
|