Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ Challenge: HP Bar

Name: Anonymous 2018-02-22 8:36

Little Nicholas wants to make a game. Unfortunately, he is stumped by the problem of displaying player's current hit points! Help him so he can finish his's game.

Input: An integer in range \([0, 100]\) representing player's current life points.

Output: A /prog/snake representing the value. The HP ranges and the faces are as follows:
――――――――――――――――――
\((70, 100]\)

_ ___.....___
`.__ ,-' ,-.`-,
`''-------' ( p ) `._
`-' (
\
. \
\---..,--'
................._ --...--,
`-.._ _.-'
`'-----''

――――――――――――――――――
\((30, 70]\)

_ ___.....___
`.__ ,-' ,-.`-,
`''-------' ( p ) `._
`-' (
\
\
.---..,--'
................._ |--...--,
`-.._ _.-'
`'-----''

――――――――――――――――――
\((0, 30]\)

_ ___.....___
`.__ ,-' .-' \
`''-------' / o ) `._
`-' (
\

______
................._ .-'' /
`-.._ _.-'
`'-----''

――――――――――――――――――
\(0\)

_ ___.....___
`.__ ,-' ,-.`-,
`''-------' ( x ) `._
`-' (
\
\
---..,--'
................._ /--...--,
`-.._ ` _.-'
`'-----''



Notes:
  • Trailing white space is allowed
  • Standard input and output is preferred but any reasonable format is allowed
  • Deadline is 1 December 2025 14 March 2018

Name: Mentifex 2018-02-22 9:25


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List