Chess with "Greedy Edi"
07 Nov 2009
24 Jan 2012)
Play chess against "Greedy Edi".
|resurrect_figure (figName, pos)
function resurrect_figure (figName, pos)
% resurrect_figure removes(beats) a figure from the field and deletes the instance
% * figName ... name of figure (e.g. 'r' or 'n')
% * pos ... position in matrix notation (i.e. [2 3])
% * global board ... chess board information
% * global game ... information about the game status
% * global game ... possible change in game status (i.e. King is beaten)
% * global board ... remove a certain figure from the board (if there was any)
% Note: If name of figure is ' ' then no resurrection takes place.
% See also: remove_figure
% * get proper instance name
% Author: W.Garn
% E-Mail: email@example.com
% Date: 2010/04/18 12:00:00
% Copyright 2010 W.Garn
if figName~=' '
instance = 'resurrected'; % normally this should be unique
if figName<'a' % then white figure (because its a capital letter
[name, handle_chess_figure] = getFigureName(figName);
handle_chess_figure('init',pos, colour, instance); %1: pos, 2: color, 3: instance