summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-08-20 14:41:35 +0300
committereug-vs <eugene@eug-vs.xyz>2022-08-20 14:41:35 +0300
commit0725b563b85ba516b5dd7b104112ee0637ec57f5 (patch)
tree93808f2a92853d50ee86b6c4349eec17d75c6471
parente729c408f4af4fe4315eecf80211ca17917b1cb2 (diff)
downloadc-chess-0725b563b85ba516b5dd7b104112ee0637ec57f5.tar.gz
fix!: dumb reverse ordering in sort_moves
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index bfe2017..f8f47e2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -516,7 +516,7 @@ int get_piece_raw_value(int piece) {
}
int compare_moves(const void* a, const void* b) {
- return ((Move*)a)->value - ((Move*)b)->value;
+ return ((Move*)b)->value - ((Move*)a)->value;
}
void sort_moves(Move* moves, int moves_count, int* board) {