예제 #1
0
 public async Task PlaceBet(List <AssetAndDescriptionId> assetAndDescriptionIds, int lookUpId, string steamId)
 {
     _betQueue.Add(new BetQueue.Item
     {
         AssetAndDescriptionIds = assetAndDescriptionIds,
         GamMode = _currentGamemode,
         RoundId = lookUpId,
         SteamId = steamId
     });
 }
예제 #2
0
        public void PlaceBetOnMatch(List <AssetAndDescriptionId> assetAndDescriptionIds, int roundId, string steamId)
        {
            if (_isClosed)
            {
                throw new CanNotBetOnClosedMatchException($"Match with roundId {roundId} is closed and does not accept bet in this state.");
            }

            var item = new BetQueue.Item
            {
                AssetAndDescriptionIds = assetAndDescriptionIds,
                RoundId = roundId,
                SteamId = steamId,
                GamMode = _gameMode
            };

            _betQueue.Add(item);
        }