shithub: moonfish

Download patch

ref: 496d788f8c4929807ee9ede7999cf142d2d1575c
parent: 72763d6ee5e817ba0b117f16106d9df8c5a5bb83
author: zamfofex <zamfofex@twdb.moe>
date: Fri Dec 15 04:39:27 EST 2023

fix promotion scoring

--- a/chess.c
+++ b/chess.c
@@ -302,7 +302,7 @@
 	unsigned char piece;
 	
 	chess->score -= moonfish_table(move->from, move->piece);
-	chess->score += moonfish_table(move->to, move->piece);
+	chess->score += moonfish_table(move->to, move->promotion);
 	chess->score -= moonfish_table(move->to, move->captured);
 	
 	chess->board[move->from] = moonfish_empty;
--