Print a better layered cake

1

I was looking at my previous challenge and thought I could make a better version, but I didn't want to modify that one, so here it is!


Challenge

Given an input n,

  • print an ASCII art cake n layers tall,
  • viewed from the side,
  • with two candles on top,
  • using box drawing characters.
  • First layer is thinner than the others.
  • Refer to the examples below.

Example output

>> cake(1)
╭─╨─╨─╮
└─────┘

>> cake(2)
  ╭─╨─╨─╮
╭─┴─────┴─╮
│         │
└─────────┘

>> cake(3)
    ╭─╨─╨─╮
  ╭─┴─────┴─╮
  │         │
╭─┴─────────┴─╮
│             │
└─────────────┘

>> cake(4)
      ╭─╨─╨─╮
    ╭─┴─────┴─╮
    │         │
  ╭─┴─────────┴─╮
  │             │
╭─┴─────────────┴─╮
│                 │
└─────────────────┘

...and so on.

Rules

  • Standard loopholes prohibited
  • Please make an attempt at a clever solution
  • Since multi-byte box drawing characters are used, solution size is measured in characters, not bytes. (Compiled/binary sizes are still measured in bytes, however.)
  • This is , so shortest answer in characters wins. However, the answer will not be selected.

Have fun!

dkudriavtsev

Posted 2016-09-18T01:44:08.413

Reputation: 5 781

Question was closed 2016-09-18T03:56:35.870

I will be happy if someone gives me an answer in silos. This seems doable. https://github.com/rjhunjhunwala/S.I.L.O.S

– Rohan Jhunjhunwala – 2016-09-18T01:49:19.697

@RohanJhunjhunwala seems like a nice language, great job! – dkudriavtsev – 2016-09-18T01:59:00.617

@DJMcMayhem are you accusing me of ripping off my own challenge? – dkudriavtsev – 2016-09-18T05:27:36.763

4

I'm not accusing you of ripping anything off. I just don't see the point of having two different challenges with an almost identical goal, and since "Answers from one question could be copied over to the other with little or no modification and still be competitive", I voted to closed.

– James – 2016-09-18T05:55:27.703

@DmitryKudriavtsev thanks – Rohan Jhunjhunwala – 2016-09-18T11:42:19.730

@DJMcMayhem You now have to properly join the cake layers instead of just printing them out sequentially, then adding a bottom layer. Many strategies used in the original code golf would not work. – dkudriavtsev – 2016-09-18T17:47:29.513

Besides being a duplicate, I think this the other version is more interesting. Though this cake is prettier, the bottom being distinct from others and the "┴" characters limits reuse of parts of the string, limiting the optimizations you can make and pushing more towards printing the individual parts. – xnor – 2016-09-18T20:05:53.963

No answers