Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- param (
- [parameter(Mandatory = $true)][int] $BiggestTip,
- [parameter(Mandatory = $false)][int] $TipScaleFactor = 2,
- [parameter(Mandatory = $false)][int] $SimulationTime = 365,
- [parameter(Mandatory = $false)][int] $MinimalBreak = 30,
- [parameter(Mandatory = $false)][int] $ClubCost = 5000000,
- [parameter(Mandatory = $false)][int] $ClubCount = 1,
- [parameter(Mandatory = $false)][bigint] $Money = 0,
- )
- Write-Output "Biggest tip claim: $BiggestTip`$"
- Write-Output "Biggest tip to daily club revenue scale factor: $TipScaleFactor"
- Write-Output "Whole simulation time period: $SimulationTime days"
- Write-Output "Minimal time period between buying new clubs: $MinimalBreak days"
- Write-Output "Club cost: $ClubCost`$"
- Write-Output "Money at the start: $Money`$"
- Write-Output "Clubs count at the start: $ClubCount`n"
- [bigint] $revenuePerClubPerDay = $BiggestTip * $TipScaleFactor
- [bigint] $revenuePerClubPerTimespan = $revenuePerClubPerDay * $MinimalBreak
- for ($day = 0; $day -lt $SimulationTime; $day += 1) {
- if ($day % $MinimalBreak -eq 0) {
- $Money += $ClubCount * $revenuePerClubPerTimespan
- while ($Money -gt $ClubCost) {
- $Money -= $ClubCost
- $ClubCount += 1
- }
- }
- }
- Write-Output "Revenues per timespan at the end of the $SimulationTime days time period:"
- if ($MinimalBreak -gt 1 -and $MinimalBreak -ne 30) {
- Write-Output "Per $MinimalBreak days: $($ClubCount * $revenuePerClubPerTimespan)`$"
- }
- Write-Output "Per day: $($ClubCount * $revenuePerClubPerDay)`$"
- Write-Output "Per month: $($revenuePerClubPerDay * $ClubCount * 30)`$`n"
- Write-Output "Clubs count at the end of the $SimulationTime days time period: $ClubCount`n"
- # Biggest tip claim: 18000$
- # Biggest tip to daily club revenue scale factor: 2
- # Whole simulation time period: 365 days
- # Minimal time period between buying new clubs: 30 days
- # Club cost: 2000000$
- # Money at the start: 0$
- # Clubs count at the start: 1
- # Revenues per timespan at the end of the 365 days time period:
- # Per day: 7236000$
- # Per month: 217080000$
- # Clubs count at the end of the 365 days time period: 201
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement