Skip to content

Instantly share code, notes, and snippets.

@fujohnwang
Created April 20, 2020 01:50
Show Gist options
  • Save fujohnwang/c50938e720c79487c4d6606d061851ac to your computer and use it in GitHub Desktop.
Save fujohnwang/c50938e720c79487c4d6606d061851ac to your computer and use it in GitHub Desktop.
type D=Double;def w(x:D,y:D,a:D)={val(i,j)=(x-a,y-8);Math.sqrt(i*i+j*j)< 8};val l:Stream[Char]="love".toStream#:::l;val c=l.toIterator;def p(b:Boolean)=print(if(b)c.next else' ');for(y<-0 to 24){for(x<-0 to 32){if(y>7)p((16-x).abs< 24-y)else p(w(x,y,8)|w(x,y,24))};println}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment