Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

2 of 5
added 849 characters in body
ovs
  • 61.2k
  • 3
  • 49
  • 164

05AB1E, 35 bytes

Quite slow, generates \33ドル^4\$ possible layers 4 times and chooses a random one each time. Layers of all - are removed.

4Lε"RWCS".•rāŽćx•â„--a×ばつK':ý

Try it online!

At the cost of one byte this can actually run fast: Try it online!

Because every quadrant in each layer has a \1ドル\$ in \33ドル\$ chance of being empty the resulting shapes are quite noisy:

SpSgCgRy:CyRgRcSw:RrCuScRu:ScSyWuCp


4L # push range [1,2,3,4] 
 ε } # for each number in this range:
 "RWCS" # string literal
 .•rāŽćx• # compressed string "urgbypcw"
 â # cartesian product of the two strings
 „--a # append "--" to this list
 4ã # 4th cartesian power, all 4-element combinations from the length-2 strings
 Ω # choose a random one
 J # join into a single string×ばつ # string of 8 -'s
 K # remove all occurences from the list
 ':ý # join the list by ":"
ovs
  • 61.2k
  • 3
  • 49
  • 164

AltStyle によって変換されたページ (->オリジナル) /