Ich hoffe, dieses Bild kommt Ihnen bekannt vor.
Es ist einer von Pacmans Geistern in seinem "verletzlichen" Zustand , nachdem Pacman eine Kraftpille gegessen hat.
Die Herausforderung
Stellen Sie sich unseren Geist in einem kleinen Rahmen mit ASCII-Kunst vor. Bei normaler Skalierung (dazu später mehr) sollte jedes Quadrat im obigen Bild einem Zeichen entsprechen, und der Rahmen sollte links und rechts vom Geist einen Abstand von einem Zeichen nach oben und unten sowie einen Abstand von zwei Zeichen aufweisen :
####################
# #
# #### #
# ######## #
# ########## #
# ############ #
# ############ #
# ### ## ### #
# #### ## #### #
# ############## #
# ############## #
# ## ## ## ## #
# # ## ## ## # #
# ############## #
# ## ### ### ## #
# # ## ## # #
# #
####################
Aber das sieht nicht sehr hübsch aus. #
ist möglicherweise nicht die beste Wahl für die aktiven Pixel. Außerdem sind die Zeichenzellen nicht quadratisch, wodurch unser Freund geisterhafter aussieht, als er es bereits ist.
Um mehr Flexibilität zu erhalten, ändert sich das Bild entsprechend drei Eingabeparametern:
- Zeichen, das für aktive Pixel verwendet werden soll;
- Horizontaler Skalierungsfaktor;
- Vertikaler Skalierungsfaktor.
Zum Beispiel mit %
, 4
, 2
wäre die ouput desto besser aussehendes Bild
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% %%%%
%%%% %%%%
%%%% %%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%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%%%% %%%%%%%% %%%%%%%%%%%% %%%%%%%%%%%% %%%%%%%% %%%%
%%%% %%%% %%%%%%%% %%%%%%%% %%%% %%%%
%%%% %%%% %%%%%%%% %%%%%%%% %%%% %%%%
%%%% %%%%
%%%% %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Regeln
Alle eingebauten erlaubt.
Eingaben werden in jedem vernünftigen Format und in jeder Reihenfolge vorgenommen. Bei der obigen ersten Eingabe (Zeichen für aktive Pixel) handelt es sich garantiert um ein druckbares ASCII-Zeichen (Codes 32 bis 126).
Leerzeichen nach jeder Zeile oder Zeilenumbrüche nach der letzten Zeile sind zulässig.
Code Golf, gewinnt die wenigsten Bytes.