- /
-
Two random poker hands
on 6 Oct 2021
- 20
- 152
- 0
- 0
- 276
% Each run will produce different deals
% without card repeats.
d=["♠","♥","♣","♦"]'+["A",2:10,"J","Q","K"];
r=randperm(52);
hold on
axis equal
for j=1:2
for i=1:5
y=(j-1)*5;
rectangle(po=[i,y,3,4.2],cu=.1,FaceC='w')
m=char(d(r(y+i)));
c=[mod(r(y+i),2)==0,0,0];
text(i+.15,y+3.7,m(2),FontSi=30,Color=c)
text(i+.1,y+2.7,m(1),FontSi=25,Color=c)
end
end
axis off