Created
August 5, 2016 07:30
-
-
Save kutyel/55ccc5f3eb45fabf3c8a41eb72de792e to your computer and use it in GitHub Desktop.
Outputs a cat to the console!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((f, t, p) => { | |
/** | |
* Returns cat's face | |
*/ | |
const face = (type) => { | |
switch (type) { | |
case 0: | |
return '( x .x)'; | |
case 1: | |
return '( o .o)'; | |
case 2: | |
return '( ^ .^)'; | |
default: | |
return '( - .-)'; | |
} | |
} | |
/** | |
* Draws cat | |
*/ | |
((faceType = 2, tick = false, padding = '') => { | |
console.log('_,------,'); | |
padding = tick ? ' ' : ' '; | |
console.log('_|' + padding + '/\\_/\\ '); | |
padding = tick ? '_' : '__'; | |
console.log((tick ? '~' : '^') + '|' + padding + face(faceType) + ' '); | |
padding = tick ? ' ' : ' '; | |
console.log(padding + '"" "" '); | |
})(f, t, p); | |
})(+process.argv[2], !!process.argv[3], process.argv[4]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment