- /
-
Chess board
on 7 Oct 2021
- 3
- 453
- 12
- 0
- 258
%%Chess Board with colour
a=zeros(8,8);
for i=1:8
for j=1:8
if mod((i+j),2)==0
a(i,j)=1;
end
end
end
h=imagesc(a);
colormap gray
h.AlphaData =.8;
%% Arrangement of chess pieces
c='color';
d=[0 2 1 -1 -2 1 2 0]+9814;
e=d+6;
for i=1:8
h=text(i,1,char(e(i)),c','y');
h=text(i,8,char(d(i)));
h=text(i,7,char(9817));
h=text(i,2,char(9817),c,'y');
end