Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :# Noisy screamface reference implementation. Requires Windows 10 ver 10586 or new to run, with Virtual terminal Sequences enabled
- :# https://codegolf.stackexchange.com/questions/237468/animate-a-noisey-ascii-screamface
- @Echo off& CHCP 65001 > nul
- Setlocal EnableDelayedExpansion&Cls
- For /f %%e in ('echo prompt $E^|cmd')Do set \e=%%e
- <nul Set /p=%\E%[?25l
- Set /A "et=8,ew=10,mt=18,mh=20"
- :# Do not modify below assignments
- Set /A "ew=ew,eg=(ew/2)+1,eh=et/2,lel=et+1,rel=ew+lel+eg,pw=ew/2-1,eb=et+eh,ler=lel+ew-1,rer=rel+ew-1,lpx=lel+ew/3,rpx=rel+ew/3"
- Set /A "mb=mt+mh-1,mib=mt+2,mih=mb-mh-1,ml=lel-1,mr=rer,mw=rer-lel+1,miw=mw-4,ph=et+(eh/2)"
- Set/A sw=lel+rer-1,sh=et/2+mh+mt,its=0
- Mode !sw!,!sh!
- For /l %%. in ()Do (
- Set "s="
- For %%n in ("!ew!+!lel!" "!ew!+!rel!")Do (Set/AY=!random!%%5+et,X=!random!%%%%~n,g=!random!%%80+40,b=!random!%%80+80&Set s=!s!%\E%[!Y!;!X!H%\E%[48;2;0;0;!b!m%\E%[38;2;0;!g!;!b!m#)
- For %%n in ("!pw!+!lpx!" "!pw!+!rpx!")Do (Set/AY=!random!%%2+ph,X=!random!%%%%~n,g=!random!%%45+15&Set s=!s!%\E%[!Y!;!X!H%\E%[48;2;0;!g!;0m%\E%[38;2;;!g!;!g!m@)
- Set/AY=!random!%%mh+mt,X=!random!%%mw+ml+1,r=!random!%%80+60,rr=!random!%%185+50,g=!random!%%40+1&Set "s=!s!%\E%[!Y!;!X!H%\E%[48;2;!r!;0;0m%\E%[38;2;!rr!;!g!;0mM"
- Set/AY=!random!%%mih+mib,X=!random!%%miw+lel+2,r=!random!%%60+20&Set "s=!s!%\E%[!Y!;!X!H%\E%[48;2;!r!;0;0m%\E%[38;2;!r!;0;!r!mW"
- Set/AY=!random!%%mih+mib,X=!random!%%miw+lel+2,r=!random!%%60+20&Set "s=!s!%\E%[!Y!;!X!H%\E%[48;2;!r!;0;0m%\E%[38;2;!r!;0;!r!mW"
- Set /a xt=yt=0,its+=1
- For /L %%i in (0 1 14)Do If not "!xt!!yt!"=="11" (
- Set /a xt=yt=0
- Set /A Y=!random!%%sh+1,X=!random!%%sw+1,r=g=b=!random!%%25+15
- If !Y! LEQ !et! Set /A yt=xt=1
- If !X! LEQ !lel! Set /A yt=xt=1
- If !X! GEQ !rer! Set /A yt=xt=1
- If !Y! GEQ !mb! Set /A yt=xt=1
- If !Y! GEQ !eb! If !Y! LEQ !mt! Set /A yt=xt=1
- If !Y! GEQ !et! If !Y! LEQ !eb! (
- If !X! GEQ !ler! If !X! LEQ !rel! Set /A yt=xt=1
- )
- )
- <nul Set/p "=!s!%\E%[!Y!;!X!H%\E%[48;2;!r!;!g!;!b!m "
- )
Add Comment
Please, Sign In to add comment