Functions/Fun/Enter-Matrix.ps1
Function Enter-Matrix { [cmdletbinding()] Param ( # Type of the Display [Parameter(Mandatory=$False)] [ValidateSet("All","Sushi","Binary","Alpha")] [String] $Type = "All" ) Begin { # Generate Character Dictionaries $Binary = @(0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1) $English = @(65..90 | foreach {$_ -as [char]}) $KATAKANA = @(12448..12543 | foreach {$_ -as [char]}) # Create Function Alphabet based on Character Dictionaries $Alphabet = switch ($Type) { "All" {$Binary+$English+$KATAKANA} "Sushi" {$KATAKANA} "Binary" {$Binary} "Alpha" {$English} } $MAX = $Alphabet.Count } Process { while($true) { $Line = for ($i = 1; $i -lt 79; $i++){($Alphabet[(get-random -Minimum 0 -Maximum $MAX)]).tostring()} write-host ($Line -join '') -ForegroundColor Green } } } |