From a7e328ae5cc790757f43c56da6aba9b0f2437c27 Mon Sep 17 00:00:00 2001 From: Tobias Grampp Date: Tue, 9 Dec 2025 10:15:46 +0100 Subject: [PATCH] Programm funktioniert jetzt und die highscore.txt datei wurde geleert --- bintree.c | 4 ++-- highscores.txt | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/bintree.c b/bintree.c index 1363dcf..ae837eb 100644 --- a/bintree.c +++ b/bintree.c @@ -29,11 +29,11 @@ TreeNode *addToTree(TreeNode *root, const void *data, size_t dataSize, CompareFc } if(compareFct(data, root->data) > 0) { - root->right = addToTree((root->right), data, dataSize, compareFct, isDuplicate); + root->left = addToTree((root->left), data, dataSize, compareFct, isDuplicate); } else if(compareFct(data, root->data) < 0) { - root->left = addToTree((root->left), data, dataSize, compareFct, isDuplicate); + root->right = addToTree((root->right), data, dataSize, compareFct, isDuplicate); } else { diff --git a/highscores.txt b/highscores.txt index 7988a44..e69de29 100644 --- a/highscores.txt +++ b/highscores.txt @@ -1,9 +0,0 @@ -HeldDerSteine;69 -Gunter11;121 -MaxiMustermann;316 -MillaMusterfrau;420 -testspieler68;2996 -testspieler69;2997 -testspieler67;2997 -testspieler1;2997 -testspieler68;4991