Skip to main content
deleted 1 character in body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135

Clean, 764 ... 686 bytes

import StdEnv,Math.Random,System._Unsafe,Text,System.Time
f=["","","   ":f]
w=" "
^ ="@@"
$s=g[hd u+t\\u<-s&t<-f]
d=reverse
r=repeatn 9
j=join
g=j w
s=split w
?n#n=n-1
#!a=removeDup[[[w<+y.[0],x,"OF",y]\\w<-:"A123456789TJQK"&x<-s"ACE ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING",y<-s"CLUBS HEARTS DIAMONDS SPADES"]!!(i rem 52)\\i<-genRandInt(toInt(accUnsafe time))]%(0,8)
#v=a!!n
#b=insertAt(n/3*3+2)v(removeAt n a)
#c=b%(n/3,n/3+2)
#c=c++removeMembers b c
#v=tl v
#(z,s)=foldl(\(c,s)k=let(p,q)=splitAt(9-size k)c in(d q++p,[j"@@ "[e<+w\\e<-:k]+j^["@@, ":[w\\_<-p]]:s]))(d c,[g(r^),g(map hd c),$b,g v,$a,$(r[^])])v
#[x:y]=z!!4
=d[j" @@ "["HERE'S","THE":y]+"! "+x:s]

Try it online!

Defines the function ? :: Int -> [String], taking the card number and returning a list of lines.

ExplainationExplanation coming when answer is finalized so I don't need to keep retyping it

Clean, 764 ... 686 bytes

import StdEnv,Math.Random,System._Unsafe,Text,System.Time
f=["","","   ":f]
w=" "
^ ="@@"
$s=g[hd u+t\\u<-s&t<-f]
d=reverse
r=repeatn 9
j=join
g=j w
s=split w
?n#n=n-1
#!a=removeDup[[[w<+y.[0],x,"OF",y]\\w<-:"A123456789TJQK"&x<-s"ACE ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING",y<-s"CLUBS HEARTS DIAMONDS SPADES"]!!(i rem 52)\\i<-genRandInt(toInt(accUnsafe time))]%(0,8)
#v=a!!n
#b=insertAt(n/3*3+2)v(removeAt n a)
#c=b%(n/3,n/3+2)
#c=c++removeMembers b c
#v=tl v
#(z,s)=foldl(\(c,s)k=let(p,q)=splitAt(9-size k)c in(d q++p,[j"@@ "[e<+w\\e<-:k]+j^["@@, ":[w\\_<-p]]:s]))(d c,[g(r^),g(map hd c),$b,g v,$a,$(r[^])])v
#[x:y]=z!!4
=d[j" @@ "["HERE'S","THE":y]+"! "+x:s]

Try it online!

Defines the function ? :: Int -> [String], taking the card number and returning a list of lines.

Explaination coming when answer is finalized so I don't need to keep retyping it

Clean, 764 ... 686 bytes

import StdEnv,Math.Random,System._Unsafe,Text,System.Time
f=["","","   ":f]
w=" "
^ ="@@"
$s=g[hd u+t\\u<-s&t<-f]
d=reverse
r=repeatn 9
j=join
g=j w
s=split w
?n#n=n-1
#!a=removeDup[[[w<+y.[0],x,"OF",y]\\w<-:"A123456789TJQK"&x<-s"ACE ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING",y<-s"CLUBS HEARTS DIAMONDS SPADES"]!!(i rem 52)\\i<-genRandInt(toInt(accUnsafe time))]%(0,8)
#v=a!!n
#b=insertAt(n/3*3+2)v(removeAt n a)
#c=b%(n/3,n/3+2)
#c=c++removeMembers b c
#v=tl v
#(z,s)=foldl(\(c,s)k=let(p,q)=splitAt(9-size k)c in(d q++p,[j"@@ "[e<+w\\e<-:k]+j^["@@, ":[w\\_<-p]]:s]))(d c,[g(r^),g(map hd c),$b,g v,$a,$(r[^])])v
#[x:y]=z!!4
=d[j" @@ "["HERE'S","THE":y]+"! "+x:s]

Try it online!

Defines the function ? :: Int -> [String], taking the card number and returning a list of lines.

Explanation coming when answer is finalized so I don't need to keep retyping it

added 14 characters in body
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38

Clean, 764 ... 688686 bytes

import StdEnv,Math.Random,System._Unsafe,Text,System.Time
f=["","","    ":f]
w=" "
^ ="@@"
$s=g[hd u+t\\u<-s&t<-f]
@ =reversed=reverse
r=repeatn 9
j=join
g=j"g=j "w
s=split"s=split "w
?n#n=n-1
#!a=removeDup[[[w<+y.[0],x,"OF",y]\\w<-:"A123456789TJQK"&x<-s"ACE ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING",y<-s"CLUBS HEARTS DIAMONDS SPADES"]!!(i rem 52)\\i<-genRandInt(toInt(accUnsafe time))]%(0,8)
#v=a!!n
#b=insertAt(n/3*3+2)v(removeAt n a)
#c=b%(n/3,n/3+2)
#c=c++removeMembers b c
#v=tl v
#(z,s)=foldl(\(c,s)k=let(p,q)=splitAt(9-size k)c in(@q++pd q++p,[j"@@ "[e<+" "\\e<"[e<+w\\e<-:k]+j"@@"["@@k]+j^["@@, ":[" "\\_<[w\\_<-p]]:s]))(@cd c,[g(r"@@"r^),g(map hd c),$b,g v,$a,$(r["@@"]r[^])])v
#[x:y]=z!!4
= @[j"=d[j" @@ "["HERE'S","THE":y]+"! "+x:s]

Try it online!Try it online!

Defines the function ? :: Int -> [String], taking the card number and returning a list of lines.

Explaination coming when answer is finalized so I don't need to keep retyping it

Clean, 764 ... 688 bytes

import StdEnv,Math.Random,System._Unsafe,Text,System.Time
f=["","","    ":f]
$s=g[hd u+t\\u<-s&t<-f]
@ =reverse
r=repeatn 9
j=join
g=j" "
s=split" "
?n#n=n-1
#!a=removeDup[[[w<+y.[0],x,"OF",y]\\w<-:"A123456789TJQK"&x<-s"ACE ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING",y<-s"CLUBS HEARTS DIAMONDS SPADES"]!!(i rem 52)\\i<-genRandInt(toInt(accUnsafe time))]%(0,8)
#v=a!!n
#b=insertAt(n/3*3+2)v(removeAt n a)
#c=b%(n/3,n/3+2)
#c=c++removeMembers b c
#v=tl v
#(z,s)=foldl(\(c,s)k=let(p,q)=splitAt(9-size k)c in(@q++p,[j"@@ "[e<+" "\\e<-:k]+j"@@"["@@, ":[" "\\_<-p]]:s]))(@c,[g(r"@@"),g(map hd c),$b,g v,$a,$(r["@@"])])v
#[x:y]=z!!4
= @[j" @@ "["HERE'S","THE":y]+"! "+x:s]

Try it online!

Defines the function ? :: Int -> [String], taking the card number and returning a list of lines.

Explaination coming when answer is finalized so I don't need to keep retyping it

Clean, 764 ... 686 bytes

import StdEnv,Math.Random,System._Unsafe,Text,System.Time
f=["","","   ":f]
w=" "
^ ="@@"
$s=g[hd u+t\\u<-s&t<-f]
d=reverse
r=repeatn 9
j=join
g=j w
s=split w
?n#n=n-1
#!a=removeDup[[[w<+y.[0],x,"OF",y]\\w<-:"A123456789TJQK"&x<-s"ACE ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING",y<-s"CLUBS HEARTS DIAMONDS SPADES"]!!(i rem 52)\\i<-genRandInt(toInt(accUnsafe time))]%(0,8)
#v=a!!n
#b=insertAt(n/3*3+2)v(removeAt n a)
#c=b%(n/3,n/3+2)
#c=c++removeMembers b c
#v=tl v
#(z,s)=foldl(\(c,s)k=let(p,q)=splitAt(9-size k)c in(d q++p,[j"@@ "[e<+w\\e<-:k]+j^["@@, ":[w\\_<-p]]:s]))(d c,[g(r^),g(map hd c),$b,g v,$a,$(r[^])])v
#[x:y]=z!!4
=d[j" @@ "["HERE'S","THE":y]+"! "+x:s]

Try it online!

Defines the function ? :: Int -> [String], taking the card number and returning a list of lines.

Explaination coming when answer is finalized so I don't need to keep retyping it

added 2 characters in body
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38

Clean, 764 ... 691688 bytes

import StdEnv,Math.Random,System._Unsafe,Text,System.Time
f=["","","    ":f]
$s=g[hd u+t\\u<-s&t<-f]
@ =reverse
r=repeatn 9
j=join
g=j" "
s=split" "
?n#n=n-1
#!a=removeDup[[[w<+y.[0],x,"OF",y]\\w<-:"A123456789TJQK"&x<-split" ""ACEs"ACE ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING",y<-["CLUBS","HEARTS","DIAMONDS","SPADES"]]s"CLUBS HEARTS DIAMONDS SPADES"]!!(i rem 52)\\i<-genRandInt(toInt(accUnsafe time))]%(0,8)
#v=a!!n
#b=insertAt(n/3*3+2)v(removeAt n a)
#c=b%(n/3,n/3+2)
#c=c++removeMembers b c
#v=tl v
#(z,s)=foldl(\(c,s)k=let(p,q)=splitAt(9-size k)c in(@q++p,[j"@@ "[e<+" "\\e<-:k]+j"@@"["@@, ":[" "\\_<-p]]:s]))(@c,[g(r"@@"),g(map hd c),$b,g v,$a,$(r["@@"])])v
#[x:y]=z!!4
= @[j" @@ "["HERE'S","THE":y]+"! "+x:s]

Try it online!Try it online!

Defines the function ? :: Int -> [String], taking the card number and returning a list of lines.

Explaination coming when answer is finalized so I don't need to keep retyping it

Clean, 764 ... 691 bytes

import StdEnv,Math.Random,System._Unsafe,Text,System.Time
f=["","","    ":f]
$s=g[hd u+t\\u<-s&t<-f]
@ =reverse
r=repeatn 9
j=join
g=j" "
?n#n=n-1
#!a=removeDup[[[w<+y.[0],x,"OF",y]\\w<-:"A123456789TJQK"&x<-split" ""ACE ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING",y<-["CLUBS","HEARTS","DIAMONDS","SPADES"]]!!(i rem 52)\\i<-genRandInt(toInt(accUnsafe time))]%(0,8)
#v=a!!n
#b=insertAt(n/3*3+2)v(removeAt n a)
#c=b%(n/3,n/3+2)
#c=c++removeMembers b c
#v=tl v
#(z,s)=foldl(\(c,s)k=let(p,q)=splitAt(9-size k)c in(@q++p,[j"@@ "[e<+" "\\e<-:k]+j"@@"["@@, ":[" "\\_<-p]]:s]))(@c,[g(r"@@"),g(map hd c),$b,g v,$a,$(r["@@"])])v
#[x:y]=z!!4
= @[j" @@ "["HERE'S","THE":y]+"! "+x:s]

Try it online!

Defines the function ? :: Int -> [String], taking the card number and returning a list of lines.

Explaination coming when answer is finalized so I don't need to keep retyping it

Clean, 764 ... 688 bytes

import StdEnv,Math.Random,System._Unsafe,Text,System.Time
f=["","","    ":f]
$s=g[hd u+t\\u<-s&t<-f]
@ =reverse
r=repeatn 9
j=join
g=j" "
s=split" "
?n#n=n-1
#!a=removeDup[[[w<+y.[0],x,"OF",y]\\w<-:"A123456789TJQK"&x<-s"ACE ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING",y<-s"CLUBS HEARTS DIAMONDS SPADES"]!!(i rem 52)\\i<-genRandInt(toInt(accUnsafe time))]%(0,8)
#v=a!!n
#b=insertAt(n/3*3+2)v(removeAt n a)
#c=b%(n/3,n/3+2)
#c=c++removeMembers b c
#v=tl v
#(z,s)=foldl(\(c,s)k=let(p,q)=splitAt(9-size k)c in(@q++p,[j"@@ "[e<+" "\\e<-:k]+j"@@"["@@, ":[" "\\_<-p]]:s]))(@c,[g(r"@@"),g(map hd c),$b,g v,$a,$(r["@@"])])v
#[x:y]=z!!4
= @[j" @@ "["HERE'S","THE":y]+"! "+x:s]

Try it online!

Defines the function ? :: Int -> [String], taking the card number and returning a list of lines.

Explaination coming when answer is finalized so I don't need to keep retyping it

deleted 94 characters in body
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38
Loading
deleted 23 characters in body
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38
Loading
deleted 48 characters in body
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38
Loading
added 14 characters in body
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38
Loading
added 12 characters in body
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38
Loading
deleted 2 characters in body
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38
Loading
Source Link
Οurous
  • 8.1k
  • 1
  • 16
  • 38
Loading