Skip to main content
added 16 characters in body
Source Link
mazzy
  • 7.2k
  • 2
  • 12
  • 22

PowerShell, 168 125 122122 121 bytes

$a=(,' '*24+'
')*16
0,8,8,88,8,8+(88,8,8|%)*2+8|%{$i=$o+=$_
'&$:&8%$%6%&%5%&%6%$%8&:$'|% t*y|%{$i+=$_-35;$a[$i]='\/'[$i%2]}}
-join$a

Try it online!Try it online!

PowerShell, 168 125 122 bytes

$a=(,' '*24+'
')*16
0,8,8,88,8,88,8,8|%{$i=$o+=$_
'&$:&8%$%6%&%5%&%6%$%8&:$'|% t*y|%{$i+=$_-35;$a[$i]='\/'[$i%2]}}
-join$a

Try it online!

PowerShell, 168 125 122 121 bytes

$a=(,' '*24+'
')*16
0,8,8+(88,8)*2+8|%{$i=$o+=$_
'&$:&8%$%6%&%5%&%6%$%8&:$'|% t*y|%{$i+=$_-35;$a[$i]='\/'[$i%2]}}
-join$a

Try it online!

added 32 characters in body
Source Link
mazzy
  • 7.2k
  • 2
  • 12
  • 22

The script creates the array of 400 chars and renders 8 diamonds started from positions with intervals 0,8,8,88,8,88,8,8.

  • The string '&$:&8%$%6%&%5%&%6%$%8&:$' contains the intervals of offsets for the rendered symbols.
  • The expression |% t*y is shortcut for |foreach-object toCharArray

The script creates the array of 400 chars and renders 8 diamonds started from positions 0,8,8,88,8,88,8,8.

  • The string '&$:&8%$%6%&%5%&%6%$%8&:$' contains offsets for the rendered symbols.
  • The expression |% t*y is shortcut for |foreach-object toCharArray

The script creates the array of 400 chars and renders 8 diamonds started from positions with intervals 0,8,8,88,8,88,8,8.

  • The string '&$:&8%$%6%&%5%&%6%$%8&:$' contains the intervals of offsets for the rendered symbols.
  • The expression |% t*y is shortcut for |foreach-object toCharArray
deleted 80 characters in body; edited body; added 77 characters in body
Source Link
mazzy
  • 7.2k
  • 2
  • 12
  • 22

PowerShell, 168 125125 122 bytes

$a=(,' '*24+'
')*16
0,8,8,88,8,88,8,8|%{$o+=$_$i=$o+=$_
&{'&$:&8%$%6%&%5%&%6%$%8&:$'|% t*y|%{$i+=$_-35;$a[$o+$i]='\35;$a[$i]='\/'[$i%2]}}}
-join$a

Try it online!Try it online!

  • The expression &{...} creates a new context with new $i variable. It is shorter then $i=0;.

  • The string '&$:&8%$%6%&%5%&%6%$%8&:$' contains offsets for the rendered symbols.

The script creates the array of 400 chars and renders 8 diamonds started from positions 0,8,8,88,8,88,8,8.

  • The string '&$:&8%$%6%&%5%&%6%$%8&:$' contains offsets for the rendered symbols.
  • The expression |% t*y is shortcut for |foreach-object toCharArray

First render steps:

PowerShell, 168 125 bytes

$a=(,' '*24+'
')*16
0,8,8,88,8,88,8,8|%{$o+=$_
&{'&$:&8%$%6%&%5%&%6%$%8&:$'|% t*y|%{$i+=$_-35;$a[$o+$i]='\/'[$i%2]}}}
-join$a

Try it online!

  • The expression &{...} creates a new context with new $i variable. It is shorter then $i=0;.

  • The string '&$:&8%$%6%&%5%&%6%$%8&:$' contains offsets for the rendered symbols.

The script creates the array of 400 chars and renders 8 diamonds started from positions 0,8,8,88,8,88,8,8:

PowerShell, 168 125 122 bytes

$a=(,' '*24+'
')*16
0,8,8,88,8,88,8,8|%{$i=$o+=$_
'&$:&8%$%6%&%5%&%6%$%8&:$'|% t*y|%{$i+=$_-35;$a[$i]='\/'[$i%2]}}
-join$a

Try it online!

The script creates the array of 400 chars and renders 8 diamonds started from positions 0,8,8,88,8,88,8,8.

  • The string '&$:&8%$%6%&%5%&%6%$%8&:$' contains offsets for the rendered symbols.
  • The expression |% t*y is shortcut for |foreach-object toCharArray

First render steps:

added 1 character in body; added 1 character in body
Source Link
mazzy
  • 7.2k
  • 2
  • 12
  • 22
Loading
added 1972 characters in body; added 36 characters in body; deleted 13 characters in body; added 1 character in body; deleted 5 characters in body
Source Link
mazzy
  • 7.2k
  • 2
  • 12
  • 22
Loading
Source Link
mazzy
  • 7.2k
  • 2
  • 12
  • 22
Loading