Пример #1
0
        public GamblingService(CharacterService charService, GamblingOptions gamblingOptions)
        {
            UserBalances = new Dictionary <IUser, long>();

            _charService     = charService;
            _gamblingOptions = gamblingOptions;
        }
Пример #2
0
        public CrapsService(GamblingService gamblingService,
                            GamblingOptions gamblingOptions,
                            Random rand)
        {
            _players = new List <IUser>();
            _bets    = new List <Bet>();

            _round        = Round.ComeOut;
            _shooterPoint = -1;

            _shooterIndex = 0;

            _gamblingService = gamblingService;
            _gamblingOptions = gamblingOptions;

            _rand = rand;

            _rollTimer          = new Timer(SHOOTER_TIMEOUT_SECONDS * 1000);
            _rollTimer.Elapsed += ShooterTimeout;
        }