Anyone here a die-hard Bethesda fan? Maybe you prefer Obsidian Entertainment? Well, if you're either of those things than the following picture should be relatively familiar to you.
I've taken the liberty of preparing a rather unique ASCII-Art challenge, so here's the first clue as to what I'm going to have you do:
_____________________________________________________
/ \
| _____________________________________________ |
| | | |
| | Welcome to ROBCO Industries (TM) Termlink | |
| | Password Required | |
| | Attempts Remaining: | |
| | | |
| | 0x01 | 0x0D | |
| | 0x02 | 0x0E | |
| | 0x03 | 0x0F | |
| | 0x04 | 0x10 | |
| | 0x05 | 0x11 | |
| | 0x06 | 0x12 | |
| | 0x07 | 0x13 | |
| | 0x08 | 0x14 | |
| | 0x09 | 0x15 | |
| | 0x0A | 0x16 | |
| | 0x0B | 0x17 | |
| | 0x0C | 0x18 | |
| |_____________________________________________| |
| |
\_______________________________________________________/
\_______________________________________/
This is a very basic (blank) template for the RobCo Fallout terminal design in pure ASCII, your job will be to:
- First, generate this template.
- Then, given a list of strings
l
and a number0 <= n <= 4
to fill it up!
The two dynamic parts of a fallout hacking terminal are:
The Number of Attempts
- The number of attempts you have remaining (indicated by space delimited boxes.
- For the purpose of this challenge you will be using
X
instead of■
.
- For the purpose of this challenge you will be using
The Passwords
- The passwords, defined by
l
, are interspersed with random printable ASCII symbols. - The passwords, as you can tell by the example, can wrap multiple rows (
NAMES
). - All passwords in the terminal screen should have an equal chance of being anywhere.
- All passwords can be expected to be of equal length, though this doesn't matter.
- The list of symbols usable to separate passwords are:
!"#$%&'()*+/:;<=>?@[\]^_{|}
. - All passwords in
l
must be of equal length. - PASSWORDS MUST HAVE THE POTENTIAL TO WRAP BETWEEN BOTH COLUMNS.
- This also goes for rows, but only to a higher byte address (0x18->0x01 is invalid).
- The display space for passwords on either side is 15 wide (with a space on either side).
- You may assume no words in
l
will be longer than this.
- You may assume no words in
- Passwords are alphabetical only, meaning only letters.
Example:
l = ["SMART","ENACT","SWORE","PITYS","SMELL","CARTS","RACES"]
, n = 4
_____________________________________________________
/ \
| _____________________________________________ |
| | | |
| | Welcome to ROBCO Industries (TM) Termlink | |
| | Password Required | |
| | Attempts Remaining: X X X X | | # N = 4 drives these X's.
| | | |
| | 0x01 $?_/%$ENACT||"} | 0x0D TYS"_'$\#|^%&{} | |
| | 0x02 }:!*@{/_<"[]#>; | 0x0E #{!"^&\]'|}_[$% | |
| | 0x03 $%&'()*+/:;<\_' | 0x0F }|[(%SMELL/_$@( | |
| | 0x04 ^SMART(!@$*'^_@ | 0x10 []_#!"{|}'%$\&^ | |
| | 0x05 (*@#%}*(!%)^(_! | 0x11 %$}[!\#'^&_]{|" | |
| | 0x06 $%&'()*+/:;<_@) | 0x12 \SWORE|%'_!}\^" | |
| | 0x07 "/')=*%!&>#<:$+ | 0x13 ^{['&$|!_]%\"#} | |
| | 0x08 ;'*$&"(<%!#)RAC | 0x14 ']!|^#[$"_\}&{% | |
| | 0x09 ES:($&';%#+"<*/ | 0x15 @)($!CARTS*!@$_ | |
| | 0x0A ;'*$&"(<%!#)/+: | 0x16 !#%${"'}&[]^|_\ | |
| | 0x0B |'_!}$\%["#^{&] | 0x17 ]"_#$&}^%[{|\'! | |
| | 0x0C #{!"^&\]'|}_[PI | 0x18 _![&#{$%\^'|}"] | | # Notice how PITYS wrapped.
| |_____________________________________________| |
| |
\_______________________________________________________/
\_______________________________________/
If n = 2
on the same example:
_____________________________________________________
/ \
| _____________________________________________ |
| | | |
| | Welcome to ROBCO Industries (TM) Termlink | |
| | Password Required | |
| | Attempts Remaining: X X | | # N = 2 drives these X's.
| | | |
| | 0x01 $?_/%$ENACT||"} | 0x0D TYS"_'$\#|^%&{} | |
| | 0x02 }:!*@{/_<"[]#>; | 0x0E #{!"^&\]'|}_[$% | |
| | 0x03 $%&'()*+/:;<\_' | 0x0F }|[(%SMELL/_$@( | |
| | 0x04 ^SMART(!@$*'^_@ | 0x10 []_#!"{|}'%$\&^ | |
| | 0x05 (*@#%}*(!%)^(_! | 0x11 %$}[!\#'^&_]{|" | |
| | 0x06 $%&'()*+/:;<_@) | 0x12 \SWORE|%'_!}\^" | |
| | 0x07 "/')=*%!&>#<:$+ | 0x13 ^{['&$|!_]%\"#} | |
| | 0x08 ;'*$&"(<%!#)RAC | 0x14 ']!|^#[$"_\}&{% | |
| | 0x09 ES:($&';%#+"<*/ | 0x15 @)($!CARTS*!@$_ | |
| | 0x0A ;'*$&"(<%!#)/+: | 0x16 !#%${"'}&[]^|_\ | |
| | 0x0B |'_!}$\%["#^{&] | 0x17 ]"_#$&}^%[{|\'! | |
| | 0x0C #{!"^&\]'|}_[PI | 0x18 _![&#{$%\^'|}"] | | # Notice how PITYS wrapped.
| |_____________________________________________| |
| |
\_______________________________________________________/
\_______________________________________/
These examples were manually crafted, so the distribution is not randomized, sorry.
This is code-golf, lowest byte-count will be the accepted winner. I will bounty this after 3 days if no answers have been submitted for a total of 250 REP.
NAMES
in the 2nd bullet point mean? "All passwords can be expected to be of equal length, though this doesn't matter." or "All passwords in l must be of equal length."? It may just be me being blind (again!) but I don't seeRACES
in either output - should we take this to mean that there should be a possibility of a password not being used? IsMath.random
(and equivalents) sufficiently random for the purposes of this challenge? \$\endgroup\$