05AB1E, (削除) 35 (削除ここまで) (削除) 40 (削除ここまで) 38(削除) 38 (削除ここまで) 36 bytes
+5 to prevent empty output which would've occured with probability \33ドル^{-16}\$
-2 bytes thanks to Kevin Cruijssen!
Quite slow, generates \33ドル^4\$ possible layers 4 times and chooses a random one each time. Layers of all - are removed.
[4Lε‘\„W‘’»Õpcw’â„[4ε‘\„W‘’»Õpcw’â„--a×ばつK':ýDgĀ#ýDĀ#
At the cost of one bytetwo bytes this can actually run fast: Try it online! 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
[ ... DgĀ#Dg# # until the length of the output is positivenot empty, do the following:
4L4 # push range [1,2,3,4]constant 1000
ε } # for each numberdigit in this rangenumber:
‘\„W‘ # dictionary compressed string "SRCW"
’»Õpcw’ # dictionary compressed string "rugbypcw"
â # 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 ":"
05AB1E, (削除) 35 (削除ここまで) (削除) 40 (削除ここまで) 38 bytes
+5 to prevent empty output which would've occured with probability \33ドル^{-16}\$
Quite slow, generates \33ドル^4\$ possible layers 4 times and chooses a random one each time. Layers of all - are removed.
[4Lε‘\„W‘’»Õpcw’â„--a×ばつK':ýDgĀ#
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
[ ... DgĀ# # until the length of the output is positive, do the following:
4L # push range [1,2,3,4]
ε } # for each number in this range:
‘\„W‘ # dictionary compressed string "SRCW"
’»Õpcw’ # dictionary compressed string "rugbypcw"
â # 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 ":"
05AB1E, (削除) 35 (削除ここまで) (削除) 40 (削除ここまで) (削除) 38 (削除ここまで) 36 bytes
+5 to prevent empty output which would've occured with probability \33ドル^{-16}\$
-2 bytes thanks to Kevin Cruijssen!
Quite slow, generates \33ドル^4\$ possible layers 4 times and chooses a random one each time. Layers of all - are removed.
[4ε‘\„W‘’»Õpcw’â„--a×ばつK':ýDĀ#
At the cost of two bytes 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
[ ... Dg# # until the the output is not empty, do the following:
4 # push constant 1000
ε } # for each digit in this number:
‘\„W‘ # dictionary compressed string "SRCW"
’»Õpcw’ # dictionary compressed string "rugbypcw"
â # 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 ":"
05AB1E, (削除) 35 (削除ここまで) 40(削除) 40 (削除ここまで) 38 bytes
+5 to prevent empty output which would've occured with probability \33ドル^{-16}\$
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•â„[4Lε‘\„W‘’»Õpcw’â„--a×ばつK':ýDgĀ#
At the cost of one byte this can actually run fast: Try it online! 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
[ ... DgĀ# # until the length of the output is positive, do the following:
4L # push range [1,2,3,4]
ε } } # for each number in this range:
"RWCS"‘\„W‘ # dictionary compressed string literal"SRCW"
’»Õpcw’ .•rāŽćx• # dictionary compressed string "urgbypcw""rugbypcw"
â â # cartesian product of the two strings
„--a # append "--" to this list
4ã 4ã # 4th cartesian power, all 4-element combinations from the length-2 strings
Ω Ω # choose a random one
J J # join into a single string×ばつ # string of 8 -'s
K # remove all occurences from the list
':ý # join the list by ":"
05AB1E, (削除) 35 (削除ここまで) 40 bytes
+5 to prevent empty output which would've occured with probability \33ドル^{-16}\$
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':ýDgĀ#
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
[ ... DgĀ# # until the length of the output is positive, do the following:
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 ":"
05AB1E, (削除) 35 (削除ここまで) (削除) 40 (削除ここまで) 38 bytes
+5 to prevent empty output which would've occured with probability \33ドル^{-16}\$
Quite slow, generates \33ドル^4\$ possible layers 4 times and chooses a random one each time. Layers of all - are removed.
[4Lε‘\„W‘’»Õpcw’â„--a×ばつK':ýDgĀ#
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
[ ... DgĀ# # until the length of the output is positive, do the following:
4L # push range [1,2,3,4]
ε } # for each number in this range:
‘\„W‘ # dictionary compressed string "SRCW"
’»Õpcw’ # dictionary compressed string "rugbypcw"
â # 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 ":"
05AB1E, 35(削除) 35 (削除ここまで) 40 bytes
+5 to prevent empty output which would've occured with probability \33ドル^{-16}\$
Quite slow, generates \33ドル^4\$ possible layers 4 times and chooses a random one each time. Layers of all - are removed.
4Lε"RWCS"[4Lε"RWCS".•rāŽćx•â„--a×ばつK':ýýDgĀ#
At the cost of one byte this can actually run fast: Try it online! 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
[ ... DgĀ# # until the length of the output is positive, do the following:
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 ":"
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':ý
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 ":"
05AB1E, (削除) 35 (削除ここまで) 40 bytes
+5 to prevent empty output which would've occured with probability \33ドル^{-16}\$
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':ýDgĀ#
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
[ ... DgĀ# # until the length of the output is positive, do the following:
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 ":"