/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
// Is this a castling move? A king move is assumed to be a castling
// move if the destination square is occupied by a friendly rook, or
// if the distance between the source and destination squares is more
// than 1.
{
// Is this a castling move? A king move is assumed to be a castling
// move if the destination square is occupied by a friendly rook, or
// if the distance between the source and destination squares is more
// than 1.
return make_castle_move(from, to);
else if (square_distance(from, to) > 1)
return make_castle_move(from, to);
else if (square_distance(from, to) > 1)
// internal "king captures rook" representation.
SquareDelta delta = (to > from ? DELTA_E : DELTA_W);
Square s = from + delta;
// internal "king captures rook" representation.
SquareDelta delta = (to > from ? DELTA_E : DELTA_W);
Square s = from + delta;
{
// En passant move? We assume that a pawn move is an en passant move
// without further testing if the destination square is epSquare.
{
// En passant move? We assume that a pawn move is an en passant move
// without further testing if the destination square is epSquare.
- if (move_promotion(move))
- str += piece_type_to_char(move_promotion(move), false);
+ if (move_is_promotion(move))
+ str += piece_type_to_char(move_promotion_piece(move), false);