Code covered by the BSD License  

Highlights from
Chess with "Greedy Edi"

image thumbnail
from Chess with "Greedy Edi" by Wolfgang Garn
Play chess against "Greedy Edi".

getFigureName

getFigureName

getFigureName returns the figures name and the handle to the figure class

Contents

Syntax

[name, handle_chess_figure] = getFigureName(fig)

Description

The figures name and its handle is returned.

Inputs:

  • fig ... single character describing the figure (i.e. k,q,r,b,...)

Outputs:

  • name ... the whole name of the figure (i.e. King, Queen, Rook,...)
  • handle_chess_figure ... handle to the chess figure class(function)

Example

The command [name, handle_chess_figure] = getFigureName('K') returns the figures name King and the handle to its class @King.

See also

King, Chess

Signature

  • Copyright 2006 W.Garn

Contact us at files@mathworks.com