mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 09:13:08 +00:00
Retire Position::see(Square from, Square to) overload
Alomst unuseful. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
fbbc7e421c
commit
ad0fdf0da6
2 changed files with 6 additions and 11 deletions
|
@ -1490,12 +1490,6 @@ void Position::undo_null_move() {
|
||||||
/// move, and one which takes a 'from' and a 'to' square. The function does
|
/// move, and one which takes a 'from' and a 'to' square. The function does
|
||||||
/// not yet understand promotions captures.
|
/// not yet understand promotions captures.
|
||||||
|
|
||||||
int Position::see(Move m) const {
|
|
||||||
|
|
||||||
assert(move_is_ok(m));
|
|
||||||
return see(move_from(m), move_to(m));
|
|
||||||
}
|
|
||||||
|
|
||||||
int Position::see_sign(Move m) const {
|
int Position::see_sign(Move m) const {
|
||||||
|
|
||||||
assert(move_is_ok(m));
|
assert(move_is_ok(m));
|
||||||
|
@ -1509,19 +1503,21 @@ int Position::see_sign(Move m) const {
|
||||||
if (midgame_value_of_piece_on(to) >= midgame_value_of_piece_on(from))
|
if (midgame_value_of_piece_on(to) >= midgame_value_of_piece_on(from))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return see(from, to);
|
return see(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Position::see(Square from, Square to) const {
|
int Position::see(Move m) const {
|
||||||
|
|
||||||
|
Square from, to;
|
||||||
Bitboard occupied, attackers, stmAttackers, b;
|
Bitboard occupied, attackers, stmAttackers, b;
|
||||||
int swapList[32], slIndex = 1;
|
int swapList[32], slIndex = 1;
|
||||||
PieceType capturedType, pt;
|
PieceType capturedType, pt;
|
||||||
Color stm;
|
Color stm;
|
||||||
|
|
||||||
assert(square_is_ok(from));
|
assert(move_is_ok(m));
|
||||||
assert(square_is_ok(to));
|
|
||||||
|
|
||||||
|
from = move_from(m);
|
||||||
|
to = move_to(m);
|
||||||
capturedType = type_of_piece_on(to);
|
capturedType = type_of_piece_on(to);
|
||||||
|
|
||||||
// King cannot be recaptured
|
// King cannot be recaptured
|
||||||
|
|
|
@ -213,7 +213,6 @@ public:
|
||||||
void undo_null_move();
|
void undo_null_move();
|
||||||
|
|
||||||
// Static exchange evaluation
|
// Static exchange evaluation
|
||||||
int see(Square from, Square to) const;
|
|
||||||
int see(Move m) const;
|
int see(Move m) const;
|
||||||
int see_sign(Move m) const;
|
int see_sign(Move m) const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue