-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathfish.psm1
67 lines (56 loc) · 1.77 KB
/
fish.psm1
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Function Invoke-Fish{
1..5|
ForEach-Object{
# Set random number of spaces
$Spaces = " "* (Get-Random -Maximum 80)
# Bubbles object 1
$Bubbles1 = "
$Spaces o
$Spaces o"
# Bubbles object 2
$Bubbles2 = "
$Spaces o"
# Fish 1 object
$Fish1 = "
$Spaces <o)))><"
# Fish 2 object
$Fish2 = "
$Spaces ><(((o>"
# Fish 3 object
$Fish3 = "
$Spaces _____
$Spaces / \
$Spaces | O . |
$Spaces \ . /
$Spaces | |
$Spaces ( O O )
$Spaces / / \ \__
$Spaces )/ /|||\ \(
$Spaces _(( /(( ))\ ))(("
# Fish 4 object
$Fish4 = "
$Spaces ^
$Spaces -----
$Spaces <--o-0-->
$Spaces -------
$Spaces -----"
# Choose random bubbles
$myBubbles = New-Object System.Collections.ArrayList
$myBubbles.Add("$Bubbles1") | Out-Null
$myBubbles.Add("$Bubbles2") | Out-Null
$RandomBubbles = Get-Random -Maximum 3
$DisplayBubbles = $myBubbles[$RandomBubbles]
# Choose random fish
$myFish = New-Object System.Collections.ArrayList
$myFish.Add("$Fish1") | Out-Null
$myFish.Add("$Fish2") | Out-Null
$myFish.Add("$Fish3") | Out-Null
$myFish.Add("$Fish4") | Out-Null
$RandomFish = Get-Random -Maximum 4
$DisplayFish = $myFish[$RandomFish]
Write-Output "$DisplayBubbles"
Write-Output "$DisplayFish"
# Delay the print
sleep .75
}
}