Games-Chess-Referee

 view release on metacpan or  search on metacpan

doc/Rules.pod  view on Meta::CPAN

    3 | . . . . . . . . | 3     3 | . . . . . . . . | 3
    2 | . . . . . . . . | 2     2 | . . . . . . . . | 2
    1 | R . . . K . . . | 1     1 | . . K R . . . . | 1
      +-----------------+         +-----------------+  
        a b c d e f g h             a b c d e f g h    


=head2 Global Considerations

Chess is an idealization of a battle. Each of the pieces has distinct capabilities that
must be accounted for in formulating strategies and tactics. When examining a board position
and selecting a move, it is important to pay attention to the guards and threats present before
and resulting from the move. A piece guards a square if the piece could capture an enemy piece
on that square on the next ply, not accounting for the fact that the enemy piece may not be able
to actually execute the capture due to constraints on its own king's disposition.

It is illegal to execute a ply that leaves the king on a guarded square. A player that manages
to execute a legal ply that causes the opposing king to be on a guarded square has put the
other player in  `check'.

For example, in this board position:



( run in 0.573 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )