shithub: moonfish

Download patch

ref: 12dd3de6901e06c686aa306f5f3a681c67e3267a
parent: 857edcbe3ee1e853350288b8fb3b4ea40c0ed831
author: zamfofex <zamfofex@twdb.moe>
date: Wed Jan 15 22:45:59 EST 2025

fix tests

--- a/scripts/check.txt
+++ b/scripts/check.txt
@@ -1,6 +1,6 @@
 perft 0: 1
 info depth 1 score cp -1 nodes 4352
-bestmove g1f3
+bestmove b1c3
 perft 0: 1
 info depth 1 score cp 85 nodes 4352
 bestmove e2a6
--- a/search.c
+++ b/search.c
@@ -163,6 +163,7 @@
 	b = bx;
 	if (!a->ignored && b->ignored) return -1;
 	if (a->ignored && !b->ignored) return 1;
+	if (a->score == b->score) return a->index - b->index;
 	return a->score - b->score;
 }
 
--