Skip to content

Instantly share code, notes, and snippets.

@jaapbrasser
Forked from dfinke/Show-Carpet
Created July 6, 2021 09:16
Show Gist options
  • Save jaapbrasser/3a2a4c35d9a478398c1de27d78dd6e24 to your computer and use it in GitHub Desktop.
Save jaapbrasser/3a2a4c35d9a478398c1de27d78dd6e24 to your computer and use it in GitHub Desktop.
The Shining carpet pattern program
<#
Orginal Python: https://twitter.com/AlSweigart/status/1411893003157913603
#>
function Show-Carpet {
param(
$X = 6, # How many times to tessellate horizontally.
$Y = 4 # How many times to tessellate vertically.
)
1..$Y | ForEach-Object {
'_ \ \ \_/ __' * $X
' \ \ \___/ _' * $X
'\ \ \_____/ ' * $X
'/ / / ___ \_' * $X
'_/ / / _ \__' * $X
'__/ / / \___' * $X
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment