Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

81%
+7 −0
Challenges In The Jailhouse Now

Challenge Given an integer n>=4 as input create an ASCII art "prison door"* measuring n-1 characters wide and n characters high, using the symbols from the example below. Example ╔╦╗ ╠╬╣ ...

6 answers  ·  posted 3y ago by Shaggy‭  ·  last activity 3y ago by snail_‭

Question code-golf ascii-art
#1: Initial revision by user avatar Shaggy‭ · 2021-08-24T14:57:08Z (about 3 years ago)
In The Jailhouse Now
# Challenge
Given an integer `n>=4` as input create an ASCII art "prison door"* measuring `n-1` characters wide and `n` characters high, using the symbols from the example below.

---
## Example
    ╔╦╗
    ╠╬╣
    ╠╬╣
    ╚╩╝

The characters used are as follows:

    ┌───────────────┬─────────┬───────┐
    │ Position      │ Symbol  │ Char  │
    ├───────────────┼─────────┼───────┤
    │ Top Left      │    ╔    │ 9556  │
    ├───────────────┼─────────┼───────┤
    │ Top           │    ╦    │ 9574  │
    ├───────────────┼─────────┼───────┤
    │ Top Right     │    ╗    │ 9559  │
    ├───────────────┼─────────┼───────┤
    │ Right         │    ╣    │ 9571  │
    ├───────────────┼─────────┼───────┤
    │ Bottom Right  │    ╝    │ 9565  │
    ├───────────────┼─────────┼───────┤
    │ Bottom        │    ╩    │ 9577  │
    ├───────────────┼─────────┼───────┤
    │ Bottom Left   │    ╚    │ 9562  │
    ├───────────────┼─────────┼───────┤
    │ Left          │    ╠    │ 9568  │
    ├───────────────┼─────────┼───────┤
    │ Inner         │    ╬    │ 9580  │
    └───────────────┴─────────┴───────┘

---
## Rules
- You may take input by any reasonable, convenient means.
- For the purposes of this challenge, in languages where the symbols used to build the "door" are multi-byte characters, they may be counted towards your score as a single byte each.
- All other characters (single- or multi-byte) should be counted as normal.
- You may output an array/list of lines instead of a multi-line string.
- Output may not contain any leading or trailing whitespace other than a trailing newline where absolutely necessary.
- This is <span class="badge is-tag">code-golf</span> so lowest byte count wins.

---
## Test Cases
    Input: 4
    Output:
    ╔╦╗
    ╠╬╣
    ╠╬╣
    ╚╩╝
    
    Input: 8
    Output:
    ╔╦╦╦╦╦╗
    ╠╬╬╬╬╬╣
    ╠╬╬╬╬╬╣
    ╠╬╬╬╬╬╣
    ╠╬╬╬╬╬╣
    ╠╬╬╬╬╬╣
    ╠╬╬╬╬╬╣
    ╚╩╩╩╩╩╝
    
    Input: 20
    Output:
    ╔╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╦╗
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╝

<sub>* Yes, I'm aware that the bigger it gets the less it looks like a prison door! :D</sub>