Mam nadzieję, że to zdjęcie wygląda znajomo.
Jest to jeden z duchów Pacmana w jego „wrażliwym” stanie , po tym jak Pacman zjadł pigułkę mocy.
Wyzwanie
Wyobraź sobie naszego ducha w małej ramce, używając grafiki ASCII. W normalnej skali (więcej o tym później) każdy kwadrat na powyższym obrazku powinien odpowiadać jednemu znakowi, a ramka powinna mieć jednoznakowy rozdział w górę i w dół oraz dwuznakowy rozdział po lewej i prawej stronie ducha :
####################
# #
# #### #
# ######## #
# ########## #
# ############ #
# ############ #
# ### ## ### #
# #### ## #### #
# ############## #
# ############## #
# ## ## ## ## #
# # ## ## ## # #
# ############## #
# ## ### ### ## #
# # ## ## # #
# #
####################
Ale to nie wygląda bardzo ładnie. #
może nie być najlepszym wyborem dla aktywnych pikseli. Poza tym komórki postaci nie są kwadratowe, co sprawia, że nasz przyjaciel wygląda bardziej upiornie niż on już jest.
Aby mieć większą elastyczność, obraz zmieni się zgodnie z trzema parametrami wejściowymi:
- Znak używany dla aktywnych pikseli;
- Współczynnik skali poziomej;
- Współczynnik skali pionowej.
Na przykład, z %
, 4
, 2
ouput byłoby lepiej wygląda obraz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% %%%%
%%%% %%%%
%%%% %%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%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%%
%%%% %%%% %%%%%%%% %%%%%%%% %%%% %%%%
%%%% %%%% %%%%%%%% %%%%%%%% %%%% %%%%
%%%% %%%%
%%%% %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Zasady
Wszystkie wbudowane dozwolone.
Dane wejściowe są pobierane w dowolnym rozsądnym formacie i dowolnej kolejności. Pierwsze wejście powyżej (znak dla aktywnych pikseli) jest gwarantowanym drukowalnym znakiem ASCII (kody od 32 do 126).
Dopuszczalne są końcowe spacje po każdej linii lub końcowe nowe linie po ostatniej linii.
Code golf, najmniej bajtów wygrywa.