Saya harap gambar ini terlihat akrab bagi Anda.
Ini adalah salah satu hantu Pacman dalam keadaan "rentan" , setelah Pacman memakan pil kekuatan.
Tantangan
Bayangkan hantu kita dalam bingkai kecil, menggunakan seni ASCII. Pada skala normal (lebih lanjut tentang ini nanti), setiap kotak pada gambar di atas harus sesuai dengan satu karakter, dan frame harus memiliki pemisahan satu karakter ke atas dan ke bawah, dan pemisahan dua karakter ke kiri dan kanan hantu :
####################
# #
# #### #
# ######## #
# ########## #
# ############ #
# ############ #
# ### ## ### #
# #### ## #### #
# ############## #
# ############## #
# ## ## ## ## #
# # ## ## ## # #
# ############## #
# ## ### ### ## #
# # ## ## # #
# #
####################
Tapi ini tidak terlihat sangat cantik. #
mungkin bukan pilihan terbaik untuk piksel aktif. Selain itu, sel-sel karakter tidak persegi, yang membuat teman kita terlihat lebih seperti hantu daripada yang sudah ada.
Jadi, untuk memiliki lebih banyak fleksibilitas, gambar akan berubah sesuai dengan tiga parameter input:
- Karakter yang akan digunakan untuk piksel aktif;
- Faktor skala horisontal;
- Faktor skala vertikal.
Misalnya, dengan %
, 4
, 2
ouput akan menjadi gambar tampak lebih baik
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% %%%%
%%%% %%%%
%%%% %%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%
%%%% %%%%%%%%%%%%%%%%%%%%%%%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%%%% %%%%
%%%% %%%% %%%%%%%% %%%%%%%% %%%% %%%%
%%%% %%%% %%%%%%%% %%%%%%%% %%%% %%%%
%%%% %%%%
%%%% %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Aturan
Semua bawaan diizinkan.
Masukan diambil dalam format apa pun yang masuk akal dan urutan apa pun. Input pertama di atas (karakter untuk piksel aktif) dijamin menjadi karakter ASCII yang dapat dicetak (kode 32 hingga 126).
Trailing space setelah setiap baris atau trailing newlines setelah baris terakhir dapat diterima.
Golf kode, byte paling sedikit menang.