3 ms·
Oh you wanna try doing code golf, after a little while it warps your thinking and this sort of thing starts looking reasonable :) using C=System.Console;class
by nrkn 16y ago
Oh you wanna try doing code golf, after a little while it warps your thinking and this sort of thing starts looking reasonable :)
using C=System.Console;class S{static int p,v,x,y,t=10;static void D(char c='@'){C.SetCursorPosition(p%t,p/t);C.Write(c);}static void Main(){var s="";for(;v<100;v++)D((s+="#### # ### ## # "[((y=v/t)<5?y:5-y+4)*5+((x=v%t)<5?x:5-x+4)])[p=v]);p=22;for(D();;D()){v=p+new[]{-1,-t,1,t}[(int)C.ReadKey(1>0).Key-37];D(' ');p=s[v]==' '?v:p;}}}
- nrkn 16y agoThat's from here btw https://github.com/nrkn/SimpleRLGolf https://github.com/nrkn/SimpleRLGolf