X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fposition.cpp;h=ff93e532d999c3012e4774a35ea98a1e07c4417b;hb=5dc23121215039938a9ef4e59ae934312774571c;hp=e1d05f614738c52c485606a94526ec2a2e8e3b76;hpb=ff211469bafcdc36c8964ae0a4b87ae277cef51a;p=stockfish diff --git a/src/position.cpp b/src/position.cpp index e1d05f61..ff93e532 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1,13 +1,14 @@ /* - Glaurung, a UCI chess playing engine. - Copyright (C) 2004-2008 Tord Romstad + Stockfish, a UCI chess playing engine derived from Glaurung 2.1 + Copyright (C) 2004-2008 Tord Romstad (Glaurung author) + Copyright (C) 2008 Marco Costalba - Glaurung is free software: you can redistribute it and/or modify + Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - Glaurung is distributed in the hope that it will be useful, + Stockfish is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -406,8 +407,8 @@ bool Position::piece_attacks_square(Square f, Square t) const { assert(square_is_ok(t)); switch(piece_on(f)) { - case WP: return white_pawn_attacks_square(f, t); - case BP: return black_pawn_attacks_square(f, t); + case WP: return pawn_attacks_square(WHITE, f, t); + case BP: return pawn_attacks_square(BLACK, f, t); case WN: case BN: return piece_attacks_square(f, t); case WB: case BB: return piece_attacks_square(f, t); case WR: case BR: return piece_attacks_square(f, t); @@ -668,8 +669,8 @@ bool Position::move_attacks_square(Move m, Square s) const { assert(square_is_occupied(f)); switch(piece_on(f)) { - case WP: return white_pawn_attacks_square(t, s); - case BP: return black_pawn_attacks_square(t, s); + case WP: return pawn_attacks_square(WHITE, t, s); + case BP: return pawn_attacks_square(BLACK, t, s); case WN: case BN: return piece_attacks_square(t, s); case WB: case BB: return piece_attacks_square(t, s); case WR: case BR: return piece_attacks_square(t, s);