Fix overflow bug, clean up code
This commit is contained in:
@@ -21,7 +21,7 @@ pub fn score_move(
|
||||
if mv.is_capture() {
|
||||
let aggressor = mailbox.piece_at(mv.src()).unwrap();
|
||||
if let Some(victim) = mailbox.piece_at(mv.dst()) {
|
||||
return aggressor.0.idx() as i16 - 8 * victim.0.idx() as i16;
|
||||
return aggressor.0.idx() as i32 - 8 * victim.0.idx() as i32;
|
||||
}
|
||||
return 0; //en passant
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user