Espero que esta imagen te resulte familiar.
Es uno de los fantasmas de Pacman en su estado "vulnerable" , después de que Pacman ha comido una píldora de poder.
El reto
Imagina a nuestro fantasma en un pequeño marco, usando el arte ASCII. A escala normal (más sobre esto más adelante), cada cuadrado en la imagen de arriba debe corresponder a un carácter, y el marco debe tener una separación de un carácter hacia arriba y hacia abajo, y una separación de dos caracteres a la izquierda y derecha del fantasma :
####################
# #
# #### #
# ######## #
# ########## #
# ############ #
# ############ #
# ### ## ### #
# #### ## #### #
# ############## #
# ############## #
# ## ## ## ## #
# # ## ## ## # #
# ############## #
# ## ### ### ## #
# # ## ## # #
# #
####################
Pero esto no se ve muy bonito. #
puede no ser la mejor opción para los píxeles activos. Además, las celdas de los personajes no son cuadradas, lo que hace que nuestro amigo se vea más fantasmal de lo que ya es.
Entonces, para tener más flexibilidad, la imagen cambiará de acuerdo con tres parámetros de entrada:
- Carácter que se utilizará para píxeles activos;
- Factor de escala horizontal;
- Factor de escala vertical.
Por ejemplo, la %
, 4
, 2
que la salida sería la mejor imagen en busca
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% %%%%
%%%% %%%%
%%%% %%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%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%%%%%%% %%%%%%%% %%%% %%%%
%%%% %%%%
%%%% %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Reglas
Todas las construcciones permitidas.
Las entradas se toman en cualquier formato razonable y en cualquier orden. Se garantiza que la primera entrada anterior (carácter para píxeles activos) será un carácter ASCII imprimible (códigos 32 a 126).
Los espacios finales después de cada línea o las nuevas líneas posteriores a la última línea son aceptables.
Código de golf, menos bytes gana.