Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Explicit
- Sub RunSim()
- Call BettingTwoDozensAtOneUnit
- Call BettingOneDozenAtTwoUnits
- Call BettingFirst18AtTwoUnits
- End Sub
- Sub BettingTwoDozensAtOneUnit()
- Dim session As Long
- Dim sessions As Long
- Dim spin As Long
- Dim spinsPerSession As Byte
- Dim winLoss As Long
- Dim bet As Byte
- Dim totalBets As Long
- Randomize
- sessions = 1000000
- spinsPerSession = 120 '3 hours at 40 spins per hour
- For session = 1 To sessions
- bet = 2
- For spin = 1 To spinsPerSession
- 'Increase the handle (total bets placed) by bet
- totalBets = totalBets + bet
- If Int((36 + 1) * Rnd) <= 12 Then 'Lose on zero or first dozen
- winLoss = winLoss - 2 'Lose 2 units
- Else 'Win on any other number
- winLoss = winLoss + 1 'Win 1 unit
- End If
- Next spin
- Next session
- Debug.Print "2Dozens - Average Bet: " & totalBets / (sessions * spinsPerSession)
- Debug.Print "2Dozens - Win per Session: " & winLoss / sessions
- Debug.Print "2Dozens - Loss Per Unit Bet: " & winLoss / (totalBets)
- End Sub
- Sub BettingOneDozenAtTwoUnits()
- Dim session As Long
- Dim sessions As Long
- Dim spin As Long
- Dim spinsPerSession As Byte
- Dim winLoss As Long
- Dim bet As Byte
- Dim totalBets As Long
- Randomize
- sessions = 1000000
- spinsPerSession = 120 '3 hours at 40 spins per hour
- For session = 1 To sessions
- bet = 2
- For spin = 1 To spinsPerSession
- 'Increase the handle (total bets placed) by bet
- totalBets = totalBets + bet
- If Int((36 + 1) * Rnd) <= 24 Then 'Lose on zero or first dozen or second dozen
- winLoss = winLoss - 2 'Lose 2 units
- Else 'Win on any other number
- winLoss = winLoss + 4 'Win 4 units
- End If
- Next spin
- Next session
- Debug.Print "1Dozen - Average Bet: " & totalBets / (sessions * spinsPerSession)
- Debug.Print "1Dozen - Win per Session: " & winLoss / sessions
- Debug.Print "1Dozen - Loss Per Unit Bet: " & winLoss / (totalBets)
- End Sub
- Sub BettingFirst18AtTwoUnits()
- Dim session As Long
- Dim sessions As Long
- Dim spin As Long
- Dim spinsPerSession As Byte
- Dim winLoss As Long
- Dim bet As Byte
- Dim totalBets As Long
- Randomize
- sessions = 1000000
- spinsPerSession = 120 '3 hours at 40 spins per hour
- For session = 1 To sessions
- bet = 2
- For spin = 1 To spinsPerSession
- 'Increase the handle (total bets placed) by bet
- totalBets = totalBets + bet
- If Int((36 + 1) * Rnd) <= 18 Then 'Lose on zero or the first 18
- winLoss = winLoss - 2 'Lose 2 units
- Else 'Win on any other number
- winLoss = winLoss + 2 'Win 4 units
- End If
- Next spin
- Next session
- Debug.Print "19to36 - Average Bet: " & totalBets / (sessions * spinsPerSession)
- Debug.Print "19to36 - Win per Session: " & winLoss / sessions
- Debug.Print "19to36 - Loss Per Unit Bet: " & winLoss / (totalBets)
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement