65
10
The purpose of this challenge is to produce an ASCII version of the cover of this great album by the rock band Pink Floyd.
The brick junctions are made of characters _
and |
. Bricks have width 7 and height 2 characters, excluding junctions. So the basic unit, including the junctions, is:
_________
| |
| |
_________
Each row of bricks is offset by half a brick width (4 chars) with respect to the previous row:
________________________________________
| | | | |
| | | | |
________________________________________
| | | | |
| | | | |
________________________________________
| | | | |
| | | | |
The wall is parameterized as follows. All parameters are measured in chars including junctions:
- Horizontal offset of first row,
F
. This is the distance between the left margin and the first vertical junction of the upmost row. (Remember also the half-brick relative offset between rows). Its possible values are0
,1
, ...,7
. - Total width,
W
. This includes junctions. Its value is a positive integer. - Total height,
H
. This includes junctions. Its value is a positive integer.
The top of the wall always coincides with the top of a row. The bottom may be ragged (if the total height is not a multiple of 3
). For example, here's the output for 6
, 44
, 11
:
____________________________________________
| | | | |
| | | | |
____________________________________________
| | | | | |
| | | | | |
____________________________________________
| | | | |
| | | | |
____________________________________________
| | | | | |
and a visual explanation of parameters:
F=6
......
. ____________________________________________
. | | | | |
. | | | | |
. ____________________________________________
. | | | | | |
H=11 . | | | | | |
. ____________________________________________
. | | | | |
. | | | | |
. ____________________________________________
. | | | | | |
............................................
W=44
Additional rules
You may provide a program or a function.
Input format is flexible as usual. Output may be through STDOUT or an argument returned by a function. In this case it may be a string with newlines or an array of strings.
Trailing spaces or newlines are allowed.
Shortest code in bytes wins.
Test cases
Inputs are in the order given above, that is: horizontal offset of first row, total width, total height.
6, 44, 11:
____________________________________________
| | | | |
| | | | |
____________________________________________
| | | | | |
| | | | | |
____________________________________________
| | | | |
| | | | |
____________________________________________
| | | | | |
2, 20, 10:
____________________
| | |
| | |
____________________
| |
| |
____________________
| | |
| | |
____________________
1, 1, 1:
_
1, 2, 3:
__
|
|
3, 80, 21:
________________________________________________________________________________
| | | | | | | | | |
| | | | | | | | | |
________________________________________________________________________________
| | | | | | | | | |
| | | | | | | | | |
________________________________________________________________________________
| | | | | | | | | |
| | | | | | | | | |
________________________________________________________________________________
| | | | | | | | | |
| | | | | | | | | |
________________________________________________________________________________
| | | | | | | | | |
| | | | | | | | | |
________________________________________________________________________________
| | | | | | | | | |
| | | | | | | | | |
________________________________________________________________________________
| | | | | | | | | |
| | | | | | | | | |
34You got me with the clickbait in the hnq – Rohan Jhunjhunwala – 2016-08-16T12:20:34.027
2@RohanJhunjhunwala Sounds about right – Insane – 2016-08-16T23:44:47.800
4Thank you for matching the number of syllables in the lyrics... you wouldn't believe how many people try to spin-off a song and get the syllabification wrong, it drives me nuts! – Chris Cirefice – 2016-08-17T23:41:24.623
1@ChrisCirefice Haha, thanks! The title was an important part of this challenge – Luis Mendo – 2016-08-18T00:54:45.787