Esempio n. 1
0
        private void AddZeroToThirdsStreakHistory(int streakLength)
        {
            if (streakLength < 1)
                return;

            var historyEntry = ThirdsStreakHistory.FirstOrDefault(cur => cur.StreakLength == streakLength);
            if (historyEntry == null)
            {
                historyEntry = new StreakViewModel { StreakLength = streakLength };
                _ThirdsStreakHistory.Add(historyEntry);
            }

            historyEntry.FollowingZeroCount++;
        }
Esempio n. 2
0
        private void AddToSimpleStreakHistory(int streakLength, bool followedByZero = false)
        {
            if (streakLength < 1)
                return;

            var historyEntry = StreakHistory.FirstOrDefault(cur => cur.StreakLength == streakLength);
            if (historyEntry == null)
            {
                historyEntry = new StreakViewModel { StreakLength = streakLength };
                _StreakHistory.Add(historyEntry);
            }

            historyEntry.Count++;
            if (followedByZero)
                historyEntry.FollowingZeroCount++;
        }