Skip to content

Latest commit

 

History

History

20-challenge

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Challenge 20

Your goal for this challenge is to take an input like Hi and turn it into ASCII art!

So for example Hi would turn into:

█ █ █
█▀█ █
▀ ▀ █

but there's a twist!

You'll also need to handle newlines! Take a look at the tests to see some examples of that in action.

Enjoy!

...wait

....what's that.....

!! BREAKING NEWS JUST-IN FROM THE TYPEHERO INVESTIGATIVE REPORTING TEAM !!

We have just received word that the term "ASCII art" is commonly used to refer to text-based visual art in general. That means that although characters are not part of the ISO-8859-1 character encoding set, it's still ASCII art! We also just received word that pencil lead has actually been made of graphite since the 16th century but we all still call it "lead" even though it's not made from the 82nd atomic element, lead(!!). News, Sports, and Weather at 11. Back to you Carol.

Expected Behavior

type Art01 = ToAsciiArt<'   * : * Merry * : *   \n  Christmas  '>
/*
    [
        '░░░░░#░░░█▄░▄█ █▀▀ █▀█ █▀█ █ █ ░░░#░░░░░',
        '░░░#░░░#░█ ▀ █ █▀▀ ██▀ ██▀ ▀█▀ ░#░░░#░░░',
        '░░░░░#░░░▀ ░░▀ ▀▀▀ ▀ ▀ ▀ ▀ ░▀ ░░░░#░░░░░',
        '░░█▀▀ █ █ █▀█ █ █▀▀ ▀█▀ █▄░▄█ █▀█ █▀▀ ░░',
        '░░█ ░░█▀█ ██▀ █ ▀▀█ ░█ ░█ ▀ █ █▀█ ▀▀█ ░░',
        '░░▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀▀▀ ░▀ ░▀ ░░▀ ▀ ▀ ▀▀▀ ░░',
    ]
*/

type Art02 = ToAsciiArt<'  Happy new  \n  * : * : * Year * : * : *  '>
/*
    [
        '░░█ █ █▀█ █▀█ █▀█ █ █ ░█▄░█ █▀▀ █ ░░█ ░░',
        '░░█▀█ █▀█ █▀▀ █▀▀ ▀█▀ ░█ ▀█ █▀▀ █▄▀▄█ ░░',
        '░░▀ ▀ ▀ ▀ ▀ ░░▀ ░░░▀ ░░▀ ░▀ ▀▀▀ ▀ ░ ▀ ░░',
        '░░░░#░░░#░░░█ █ █▀▀ █▀█ █▀█ ░░░#░░░#░░░░',
        '░░#░░░#░░░#░▀█▀ █▀▀ █▀█ ██▀ ░#░░░#░░░#░░',
        '░░░░#░░░#░░░░▀ ░▀▀▀ ▀ ▀ ▀ ▀ ░░░#░░░#░░░░',
    ]
*/

type Art03 = ToAsciiArt<'  * : * : * : * : * : * \n  Trash  \n  * : * : * : * : * : * '>
/*
    [
        '░░░░#░░░#░░░#░░░#░░░#░░░',
        '░░#░░░#░░░#░░░#░░░#░░░#░',
        '░░░░#░░░#░░░#░░░#░░░#░░░',
        '░░▀█▀ █▀█ █▀█ █▀▀ █ █ ░░',
        '░░░█ ░██▀ █▀█ ▀▀█ █▀█ ░░',
        '░░░▀ ░▀ ▀ ▀ ▀ ▀▀▀ ▀ ▀ ░░',
        '░░░░#░░░#░░░#░░░#░░░#░░░',
        '░░#░░░#░░░#░░░#░░░#░░░#░',
        '░░░░#░░░#░░░#░░░#░░░#░░░',
    ]
*/

type Art04 = ToAsciiArt<'  : * : * : * : * : * : * : \n  Ecyrbe  \n  : * : * : * : * : * : * : '>
/*
    [
        '░░#░░░#░░░#░░░#░░░#░░░#░░░#░',
        '░░░░#░░░#░░░#░░░#░░░#░░░#░░░',
        '░░#░░░#░░░#░░░#░░░#░░░#░░░#░',
        '░░█▀▀ █▀▀ █ █ █▀█ █▀▄ █▀▀ ░░',
        '░░█▀▀ █ ░░▀█▀ ██▀ █▀▄ █▀▀ ░░',
        '░░▀▀▀ ▀▀▀ ░▀ ░▀ ▀ ▀▀  ▀▀▀ ░░',
        '░░#░░░#░░░#░░░#░░░#░░░#░░░#░',
        '░░░░#░░░#░░░#░░░#░░░#░░░#░░░',
        '░░#░░░#░░░#░░░#░░░#░░░#░░░#░',
    ]
*/

Prompt by Dimitri Mitropoulos of MiTS.