Skip to content

Commit

Permalink
Merge pull request #1 from sawft99/dev
Browse files Browse the repository at this point in the history
Added features
  • Loading branch information
sawft99 authored Jul 7, 2023
2 parents f1cc826 + 03816b9 commit f85651b
Show file tree
Hide file tree
Showing 3 changed files with 675 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Roulette
Roulette game simulation. Runs a configurable number of iterations where you can specify what you bet on and the amount you want to bet. Currently limited to placing only of each type of bet. For example, you are only able to bet on the first dozen or a particular number and not several of each.

## Versions
| File | Description | All the same Picks | (C)ombined Wallet/(S)tarting Wallet/(W)innings Only |
| ---- | ----------- | ------------------ | --------------------------------------------------- |
| [Roulette](/Roulette.ps1) | A game of roulette where you bet the same dollar amount each round | X | C |
| [Roulette_Percent_Bet_CombinedWallet](/Roulette_Percent_Bet_CombinedWallet.ps1) | A game of roulette where you bet the same percentage of your wallet total each round | X | C |

## Use
- Configure what you want to bet on in $BetPlace
- Configure the amount you want to bet for each in $BetAmount
Expand All @@ -15,3 +21,4 @@ Roulette game simulation. Runs a configurable number of iterations where you can
## To Do
- Add ability for placing several bets of each type (Betting on 2 different columns, 3 different numbers, etc.)
- Add ability for betting different amounts for each type ($3 on 5, $7 on 2, $10 on row 2, $15 on row 3, etc.)

10 changes: 7 additions & 3 deletions Roulette.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#Premade Variables
##Add/Remove '0' numbers as needed
$Numbers = @('0','00','000','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36')
[Int]$Iterations = 50
[Int]$Iterations = 25
$Table = @()
$EvenOdds = @()
##Payout/Ratio
Expand All @@ -17,7 +17,7 @@ $EvenOdds = @()
[Int]$OEPay = 1
[Int]$ColorPay = 1

##Money
#Money
[Int]$Wallet = 150

#Bet
Expand All @@ -33,7 +33,7 @@ $BetPlace = [PSCustomObject]@{
$BetAmount = [PSCustomObject]@{
Color = 20
OE = 30
Number = 3
Number = 1
Row = 0
Column = 0
Dozen = 5
Expand Down Expand Up @@ -464,6 +464,9 @@ $Play = Play

$NetGainCount = ($Global:NetGain -split ',').count
$NetGainP = ($NetGainCount / $Iterations).ToString("P")
$HighestWalletIndex = ($WalletLog -split ',' | Sort-Object {[int]$_}).IndexOf(($WalletLog -split ',' | Sort-Object {[int]$_} -Descending)[0])
$HighestWallet = ($WalletLog -split ',' | Sort-Object {[int]$_})[$HighestWalletIndex]
$HighestWalletPlay = ($WalletLog -split ',').IndexOf("$HighestWallet")

#Stats

Expand Down Expand Up @@ -651,6 +654,7 @@ Write-Host ""
Write-Host (("Ending Wallet: $") + $Wallet.ToString("N0"))
Write-Host ""
Write-Host ("Wallet Log: $" + "$WalletLog")
Write-Host ("Wallet Peak: $" + "$HighestWallet" + " - Play" + " $HighestWalletPlay")
Write-Host ""
Write-Host "Rounds with Net Gain: $NetGainP ($NetGainCount)
"
Loading

0 comments on commit f85651b

Please sign in to comment.