legal_move checks whether a move is legal.
answer = legal_move
It is checked whether a chess figures move (stored in global structure cursor) is legal or not.
Note: That this function calls the chess figure class identified by the figure which is on the "from" field. This function is called from the stopCursor event-function.
Inputs:
Outputs:
Assume there is a global board information, describing the chess board and a global cursor structure. The cursor structure contains the fields from and to. The function legal_move will check whether the move "cursor.from" to "cursor.to" is legal.
King, Queen, Knight, Bishop, Rook, Pawn, stopCursor