Code covered by the BSD License
by Wolfgang Garn
07 Nov 2009
(Updated 24 Jan 2012)
Play chess against "Greedy Edi".
is_in_check Whether a figure will be in check.
[answer, color] = is_in_check(from, to)
If a figure is moved from a to b, whether and if, which color is in check
This function is useful for the castling and to check whether a move is legal.
Assume you like to do the castling. The the kings method 'possible' will call has_moved([8 8]).
Published with wg_publish; V1.0