Last active
September 14, 2019 15:41
-
-
Save Chirimen-Jako/f1ff9445ac391610eaa012d79fb01817 to your computer and use it in GitHub Desktop.
おっぱいそんちくびんびん♪ (PowerShell)
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
<# | |
おっぱい.ps1 | |
2019/08/19: initial release | |
Microsoft Windows 10 Version 1903 (OS build 18362.295) | |
PS C:\> $PSVersionTable | |
Name Value | |
---- ----- | |
PSVersion 5.1.18362.145 | |
PSEdition Desktop | |
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} | |
BuildVersion 10.0.18362.145 | |
CLRVersion 4.0.30319.42000 | |
WSManStackVersion 3.0 | |
PSRemotingProtocolVersion 2.3 | |
SerializationVersion 1.1.0.1 | |
Dedicated to shirasu | |
https://gist.github.com/8q/a5331c6ef8a205b32125 | |
#> | |
[string] $realStr = "おっぱいそんちくびんびん" | |
[array] $oppaiElements = "おっ", "ぱい", "そん", "ちく", "びん", "びん" | |
[string] $testStr = "" | |
[int] $count = 0 | |
while ($testStr -notmatch $realStr) { | |
$count++; | |
[array] $numList = 0..5 | Sort-Object {Get-Random} | |
$testStr = -join $numList.ForEach( {$oppaiElements[$_]} ) | |
echo "${count} ${testStr}" | |
} | |
echo ("おめでとうございます!" + " " + ` | |
"あなたは${count}回目に${realStr}しました。") | |
echo "end" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment