Code covered by the BSD License  

Highlights from
Chess with "Greedy Edi"

image thumbnail

Chess with "Greedy Edi"

by

 

07 Nov 2009 (Updated )

Play chess against "Greedy Edi".

displayAllMoves
function displayAllMoves
% displayMovesHistoryList  Displays all moves done so far as a list
%
% Notes
% Chess fonts must be installed first
% Right-Click on TTF file and choose install 
% http://www.rebel.nl/epd2diag.htm#E2P_TTF
% http://www.chessvariants.com/d.font/
% http://www.chess.com/downloads/fonts
%
% The following command attempts to copy the fonts direclty into the
% Windows 7 folder. However, there may be access right violoations
% !copy "fonts\TrueType fonts by Armando H. Marroquin\*.TTF" "C:\Windows\Fonts\*.*"
% Chessopolis
% http://www.chessopolis.com/software.htm
%
%% Signature
% Author: W.Garn
% E-Mail: wgarn@yahoo.com
% Date: 2011/01/20
% 
% Copyright 2011 W.Garn
%
global board
global history;
close all;
fid=1;
nwm = length(history.white); %number of moves
nbm = length(history.black);
yps=20; yp = yps; step = 1; xp=0;
figure('Color','w'); axis([0 1 1 yps]); axis off; 
title(['\fontsize{14} G. Edi - ' getenv('USERNAME'), ...
 ' \newline \fontsize{10} \color{red} \it' date ]);
for k=1:nbm
    %fprintf(fid,'%2i. %s \t %s\n',k, history.white{k}, history.black{k});
    text(xp+.05,yp,[num2str(k) '. '],'FontName','FigurineSymbol T1','FontSize',12);
    text(xp+.10,yp,[history.white{k}],'FontName','FigurineSymbol T1','FontSize',12);
    text(xp+.25,yp,history.black{k},'FontName','FigurineSymbol T1','FontSize',12);
    yp = yp - step;
    if yp<0, yp=yps; xp=xp+.5; line([xp xp],[0 yps],'Color','k'); end 
end
if nwm>nbm
    %fprintf(fid,'%2i. %s\n',nwm, history.white{nwm});
    text(xp+.05,yp,[num2str(k) '. '],'FontName','FigurineSymbol T1','FontSize',12);
    text(xp+.10,yp,[history.white{k}],'FontName','FigurineSymbol T1','FontSize',12);
end

Contact us