Skip to main content
Tweeted twitter.com/StackCodeGolf/status/845835679707922432
Post Reopened by ETHproductions, Okx, ovs, fəˈnɛtɪk, Rod
deleted 35 characters in body
Source Link
Dead Possum
  • 3.4k
  • 13
  • 25
  1. Every road has a straight line of minuses(-) above and below it.
  2. Every road has the same number of lanes in both directions.
  3. IfEvery road has more than one lane on each side, it has a line of equal signs(=) down the middle.
  4. Lanes have dashed lines between them (exceptingexcep the special middle line from rule #3). One minus, one whitespace and so on. Starting with the minus.
Road with one lane in both sides:

--------------

- - - - - - -==============

--------------

Road with two lanes in both sides:

--------------

- - - - - - -

==============

- - - - - - - 

--------------
  1. Every road has 7n total holes. n is the ceiling of the number of holes that will fit on the road divided by seven.

  2. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  3. Every road has 2n holes that are fixed and represented as double # (##).

  4. Every road also has n holes that are fixed well and represented as double H (HH).

  5. Holes (in any state) appear on every lane in diagonal pattern, starting at the top right and moving down-across. A new line of holes should start in every 4th lane and every 8 characters in the top lane. See the examples for clarification.

  6. The order of holes is irrelevant.

  7. If 7n holes can't fit in road of given length, you may use #5#6 to choose which of the holes will not be visible.

------------------
OO  OO  OO  OO  OO
- - - - - - - - -==================
  OO  OO  OO  ##
------------------
  1. Every road has a straight line of minuses(-) above and below it.
  2. Every road has the same number of lanes in both directions.
  3. If road has more than one lane on each side, it has a line of equal signs(=) down the middle.
  4. Lanes have dashed lines between them (excepting the special middle line from rule #3). One minus, one whitespace and so on. Starting with the minus.
Road with one lane in both sides:

--------------

- - - - - - -

--------------

Road with two lanes in both sides:

--------------

- - - - - - -

==============

- - - - - - - 

--------------
  1. Every road has 7n total holes. n is the ceiling of the number of holes that will fit on the road divided by seven.

  2. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  3. Every road has 2n holes that are fixed and represented as double # (##).

  4. Every road also has n holes that are fixed well and represented as double H (HH).

  5. Holes (in any state) appear on every lane in diagonal pattern, starting at the top right and moving down-across. A new line of holes should start in every 4th lane and every 8 characters in the top lane. See the examples for clarification.

  6. The order of holes is irrelevant.

  7. If 7n holes can't fit in road of given length, you may use #5 to choose which of the holes will not be visible.

------------------
OO  OO  OO  OO  OO
- - - - - - - - -
  OO  OO  OO  ##
------------------
  1. Every road has a straight line of minuses(-) above and below it.
  2. Every road has the same number of lanes in both directions.
  3. Every road has a line of equal signs(=) down the middle.
  4. Lanes have dashed lines between them (excep the special middle line from rule #3). One minus, one whitespace and so on. Starting with the minus.
Road with one lane in both sides:

--------------

==============

--------------

Road with two lanes in both sides:

--------------

- - - - - - -

==============

- - - - - - - 

--------------
  1. Every road has 7n total holes. n is the ceiling of the number of holes that will fit on the road divided by seven.

  2. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  3. Every road has 2n holes that are fixed and represented as double # (##).

  4. Every road also has n holes that are fixed well and represented as double H (HH).

  5. Holes (in any state) appear on every lane in diagonal pattern, starting at the top right and moving down-across. A new line of holes should start in every 4th lane and every 8 characters in the top lane. See the examples for clarification.

  6. The order of holes is irrelevant.

  7. If 7n holes can't fit in road of given length, you may use #6 to choose which of the holes will not be visible.

------------------
OO  OO  OO  OO  OO
==================
  OO  OO  OO  ##
------------------
deleted 197 characters in body
Source Link
ETHproductions
  • 50.1k
  • 6
  • 94
  • 240

Output

Output or return an ASCII-art image of the road with as many holes as will fit. Read the next two sections to see how the road and holes should be generated.

Road layout

  1. Every road has 7n total holes. n is the ceiling of the number of holes that will fit on the road divided by seven.

  2. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  3. Every road has 2n holes that are fixed and represented as double # (##).

  4. Every road also has n holes that are fixed well and represented as double H (HH).

  5. Holes (in any state) appear on every lane in diagonal pattern (see exemples), starting at the top right and moving down-across. A new line of holes should start in every 4th lane and every 8 characters in the top lane. See the examples for clarification.

  6. The order of holes is irrelevant.

  7. If 7n holes can't fit in road of given length, you may use #5 to choose which of the holes will not be visible.

Another corner exapleexample. Road can have only 3 holes. So pool is 7: 4(OO), 2(##), 1(HH). An againAgain, any can be used:

  1. You may change the appearance of holes to two of any other character, except -, = and whitespace. Just mention it in your answer.
  2. It's , so make your code as compact as possible.

Task

  1. Calculate the maximum number of holes that can fit in the given road, and round up to a multiple of 7.
  2. Draw the road with the maximum number of holes in it. The holes should be in a ratio of 4:2:1 (unfixed:fixed poorly:fixed well), though if not all 7n holes will fit you may remove any of them. (see the "Hole layout" section for clarification)

Road layout

  1. Every road has 7n total holes. n is the ceiling of the number of holes that will fit on the road divided by seven.

  2. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  3. Every road has 2n holes that are fixed and represented as double # (##).

  4. Every road also has n holes that are fixed well and represented as double H (HH).

  5. Holes (in any state) appear on every lane in diagonal pattern (see exemples).

  6. The order of holes is irrelevant.

  7. If 7n holes can't fit in road of given length, you may use #5 to choose which of the holes will not be visible.

Another corner exaple. Road can have only 3 holes. So pool is 7: 4(OO), 2(##), 1(HH). An again any can be used

  1. You may change the appearance of holes to two of any other character, except -, = and whitespace. Just mention it in your answer.
  2. It's , so make your code as compact as possible.

Task

  1. Calculate the maximum number of holes that can fit in the given road, and round up to a multiple of 7.
  2. Draw the road with the maximum number of holes in it. The holes should be in a ratio of 4:2:1 (unfixed:fixed poorly:fixed well), though if not all 7n holes will fit you may remove any of them. (see the "Hole layout" section for clarification)

Output

Output or return an ASCII-art image of the road with as many holes as will fit. Read the next two sections to see how the road and holes should be generated.

Road layout

  1. Every road has 7n total holes. n is the ceiling of the number of holes that will fit on the road divided by seven.

  2. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  3. Every road has 2n holes that are fixed and represented as double # (##).

  4. Every road also has n holes that are fixed well and represented as double H (HH).

  5. Holes (in any state) appear on every lane in diagonal pattern, starting at the top right and moving down-across. A new line of holes should start in every 4th lane and every 8 characters in the top lane. See the examples for clarification.

  6. The order of holes is irrelevant.

  7. If 7n holes can't fit in road of given length, you may use #5 to choose which of the holes will not be visible.

Another corner example. Road can have only 3 holes. So pool is 7: 4(OO), 2(##), 1(HH). Again, any can be used:

  1. You may change the appearance of holes to two of any other character, except -, = and whitespace. Just mention it in your answer.
  2. It's , so make your code as compact as possible.
added 225 characters in body
Source Link
ETHproductions
  • 50.1k
  • 6
  • 94
  • 240

HolesHole layout

  1. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  2. Every road has 2n holes that are fixed and represented as double # (##).

  3. Every road also has n holes that are fixed well and represented as double H (HH).

  4. Holes (in any state) appear on every lane in diagonal pattern (see exemples).

  5. The order of holes is irrelevant.

  6. If 7n holes can't fit in road of given length, you may use #5 to choose which of the holes will not be visible.

  1. Every road has 7n total holes. n is the ceiling of the number of holes that will fit on the road divided by seven.

  2. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  3. Every road has 2n holes that are fixed and represented as double # (##).

  4. Every road also has n holes that are fixed well and represented as double H (HH).

  5. Holes (in any state) appear on every lane in diagonal pattern (see exemples).

  6. The order of holes is irrelevant.

  7. If 7n holes can't fit in road of given length, you may use #5 to choose which of the holes will not be visible.

  1. Calculate the maximum number of holes that can fit in the given road, and round up to a multiple of 7.
  2. Draw the road with the maximum number of holes in it. The holes should be in an approximatea ratio of 4:2:1 (unfixed:fixed poorly:fixed well), though if not all 7n holes will fit you may remove any of them. (see Holes layoutthe "Hole layout" section for clarification)

Holes layout

  1. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  2. Every road has 2n holes that are fixed and represented as double # (##).

  3. Every road also has n holes that are fixed well and represented as double H (HH).

  4. Holes (in any state) appear on every lane in diagonal pattern (see exemples).

  5. The order of holes is irrelevant.

  6. If 7n holes can't fit in road of given length, you may use #5 to choose which of the holes will not be visible.

  1. Calculate the maximum number of holes that can fit in the given road
  2. Draw the road with the maximum number of holes in it. The holes should be in an approximate ratio of 4:2:1 (unfixed:fixed poorly:fixed well). (see Holes layout for clarification)

Hole layout

  1. Every road has 7n total holes. n is the ceiling of the number of holes that will fit on the road divided by seven.

  2. Every road has 4n unfixed holes. An unfixed hole is represented as double O (OO).

  3. Every road has 2n holes that are fixed and represented as double # (##).

  4. Every road also has n holes that are fixed well and represented as double H (HH).

  5. Holes (in any state) appear on every lane in diagonal pattern (see exemples).

  6. The order of holes is irrelevant.

  7. If 7n holes can't fit in road of given length, you may use #5 to choose which of the holes will not be visible.

  1. Calculate the maximum number of holes that can fit in the given road, and round up to a multiple of 7.
  2. Draw the road with the maximum number of holes in it. The holes should be in a ratio of 4:2:1 (unfixed:fixed poorly:fixed well), though if not all 7n holes will fit you may remove any of them. (see the "Hole layout" section for clarification)
added 514 characters in body
Source Link
Dead Possum
  • 3.4k
  • 13
  • 25
Loading
added 109 characters in body
Source Link
fəˈnɛtɪk
  • 4.2k
  • 2
  • 14
  • 40
Loading
added 88 characters in body
Source Link
Dead Possum
  • 3.4k
  • 13
  • 25
Loading
Post Closed as "Needs details or clarity" by fəˈnɛtɪk, Okx, user42649, ETHproductions, DJMcMayhem
edited body
Source Link
fəˈnɛtɪk
  • 4.2k
  • 2
  • 14
  • 40
Loading
added 92 characters in body
Source Link
fəˈnɛtɪk
  • 4.2k
  • 2
  • 14
  • 40
Loading
fix typos
Source Link
ETHproductions
  • 50.1k
  • 6
  • 94
  • 240
Loading
deleted 2 characters in body
Source Link
ETHproductions
  • 50.1k
  • 6
  • 94
  • 240
Loading
clarify a few things, hopefully
Source Link
ETHproductions
  • 50.1k
  • 6
  • 94
  • 240
Loading
Source Link
Dead Possum
  • 3.4k
  • 13
  • 25
Loading