Created
August 8, 2020 21:34
-
-
Save smaglio81/557ab0dc1f39966a36de26b18617ae9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-RandomConjunction { | |
[CmdletBinding()] | |
param() | |
$Chance = Get-RandomPercent | |
switch ($Chance) { | |
{ 1..45 -contains $_ } { 'and' } # 45% chance for 'and' | |
{ 46..75 -contains $_ } { 'or' } # 25% chance for 'or' | |
{ 76..85 -contains $_ } { ',' } # 10% chance for 'comma' | |
{ 86..95 -contains $_ } { ';' } # 10% chance for 'semi-colon' | |
{ 96..100 -contains $_ } { ':' } # 5% chance for 'colon' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment