7
\$\begingroup\$

This question already has an answer here:

I need help making a brick road to go beside my brick wall!

\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
 \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__
__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\ 
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
 \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__
__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\ 
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
 \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__
__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\ 
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \

This road is 10 characters long and 70 characters wide, seems familiar right?

We have to stay efficient with this road as well, no input and lowest byte count in some code that produces this pattern in an output wins!

This code-golf puzzle isn't the same as the predecessor mentioned above, as the output requires a different approach rather than just simply outputting what it asks (because the pattern is offscured and not exactly the same). It was purposefully included like this for the puzzle to match the theme of my page and also include a higher difficulty for the user (the original was very simple for some). This was mentioned below in the comments.

\$\endgroup\$

marked as duplicate by betseg, AdmBorkBork, DJMcMayhem, mbomb007, xnor code-golf Nov 15 '16 at 23:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 7
    \$\begingroup\$ I thought this was a dupe at first, but it's trickier because the "repeat 175 times and split into strings of length 40" technique won't work as in the last question. \$\endgroup\$ – ETHproductions Nov 15 '16 at 21:04
  • 3
    \$\begingroup\$ @ETHproductions It's not that far away. You just split into strings of length 74 and then discard the last 4 columns. \$\endgroup\$ – Martin Ender Nov 15 '16 at 21:10
  • 2
    \$\begingroup\$ it's not quite repeating \$\endgroup\$ – Blue Nov 15 '16 at 21:12
  • 2
    \$\begingroup\$ This is a lot nastier than the brick wall. nice question. \$\endgroup\$ – ElPedro Nov 15 '16 at 23:14
  • \$\begingroup\$ Personally I thought this was a bit more challenging than the brick wall and wouldn't have voted a dupe but then I'm still pretty new here and it looks like the rules are getting tighter. Was going to look at a Pyth solution as well but obviously won't bother now. \$\endgroup\$ – ElPedro Nov 16 '16 at 0:25
1
\$\begingroup\$

Pyke, 19 bytes

"\  \__"w�*Tf70L<_X

where � is the literal byte 156.

Try it here!

\$\endgroup\$
  • \$\begingroup\$ apparently so. I've given up trying to work it out with encodings and stuff \$\endgroup\$ – Blue Nov 15 '16 at 21:46
1
\$\begingroup\$

V, 20 bytes

123i\  \__ò70|lé
4x

Try it online!

As usual, here is a hexdump:

0000000: 3132 3369 5c20 205c 5f5f 1bf2 3730 7c6c  123i\  \__..70|l
0000010: e90a 3478                                ..4x

Explanation:

123                     " 123 times:
   i                    " Insert the following:
    \  \__              " '\  \__'
          <esc>         " Return to normal mode
               ò        " Recursively:
                70|     "   Move to the 70th column
                   l    "   Move one char over
                    é   "   Insert a single newline
4x                      "   Delete 4 characters
\$\endgroup\$
1
\$\begingroup\$

Retina, 32 31 bytes


123$*_

\  \_
S_`(.{70}).{0,4}

Try it online!

\$\endgroup\$
1
\$\begingroup\$

PowerShell v2+, 58 38 bytes

'\  \__'*123-split"(.{70}).{0,4}"-ne''

Basically the same as my Build me a brick wall answer, just with additional logic to take the appropriate portions. Thanks to @MartinEnder for saving 20 bytes.

PS C:\Tools\Scripts\golfing> .\build-me-a-brick-road.ps1
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
 \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__
__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\ 
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
 \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__
__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\ 
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
 \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__
__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\ 
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
\$\endgroup\$
1
\$\begingroup\$

Python 2, 79 78 bytes

for x in range(10):a='\\  \\__';b=a*11+a[:4];print b[x*2:70]+b[4:x*3+4-x]

Got there in the end. Just builds a big string, cuts off the beginning and kind of adds the beginning to the end (if that makes sense).

-1 for an unneeded 0

Output:

python follow-the-yellow-brick-road.py
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
 \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__
__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\ 
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
 \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__
__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\ 
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
 \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__
__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\ 
\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \__\  \
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.