highscore zum gitignore hinzugefügt
This commit is contained in:
parent
9bf5e6a541
commit
d9222b83b4
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
doble_initial.exe
|
doble_initial.exe
|
||||||
*.o
|
*.o
|
||||||
*.exe
|
*.exe
|
||||||
|
highscore.txt
|
||||||
10
bintree.c
10
bintree.c
@ -13,14 +13,6 @@
|
|||||||
// ordering. Accepts duplicates if isDuplicate is NULL, otherwise ignores
|
// ordering. Accepts duplicates if isDuplicate is NULL, otherwise ignores
|
||||||
// duplicates and sets isDuplicate to 1 (or to 0 if a new entry is added).
|
// duplicates and sets isDuplicate to 1 (or to 0 if a new entry is added).
|
||||||
|
|
||||||
void copyData(void *dest, const void *src, size_t size) {
|
|
||||||
unsigned char *d = dest;
|
|
||||||
const unsigned char *s = src;
|
|
||||||
for (size_t i = 0; i < size; i++) {
|
|
||||||
d[i] = s[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TreeNode *addToTree(TreeNode *root, const void *data, size_t dataSize,
|
TreeNode *addToTree(TreeNode *root, const void *data, size_t dataSize,
|
||||||
CompareFctType compareFct, int *isDuplicate) {
|
CompareFctType compareFct, int *isDuplicate) {
|
||||||
|
|
||||||
@ -33,7 +25,7 @@ TreeNode *addToTree(TreeNode *root, const void *data, size_t dataSize,
|
|||||||
if (root == NULL) {
|
if (root == NULL) {
|
||||||
TreeNode *node = malloc(sizeof(TreeNode));
|
TreeNode *node = malloc(sizeof(TreeNode));
|
||||||
node->data = malloc(dataSize);
|
node->data = malloc(dataSize);
|
||||||
copyData(node->data, data, dataSize);
|
memcpy(node->data, data, dataSize);
|
||||||
node->left = NULL;
|
node->left = NULL;
|
||||||
node->right = NULL;
|
node->right = NULL;
|
||||||
return node;
|
return node;
|
||||||
|
|||||||
@ -11,8 +11,6 @@ typedef struct node {
|
|||||||
struct node *right;
|
struct node *right;
|
||||||
} TreeNode;
|
} TreeNode;
|
||||||
|
|
||||||
void copyData(void *dest, const void *src, size_t size);
|
|
||||||
|
|
||||||
// Adds a copy of data's pointer destination to the tree using compareFct for
|
// Adds a copy of data's pointer destination to the tree using compareFct for
|
||||||
// ordering. Accepts duplicates if isDuplicate is NULL, otherwise ignores
|
// ordering. Accepts duplicates if isDuplicate is NULL, otherwise ignores
|
||||||
// duplicates and sets isDuplicate to 1 (or to 0 if a new entry is added).
|
// duplicates and sets isDuplicate to 1 (or to 0 if a new entry is added).
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
Kristin;49209
|
||||||
|
Kristin;9959
|
||||||
Kristin;9944
|
Kristin;9944
|
||||||
Kristin;7947
|
Kristin;7947
|
||||||
Kristin;6962
|
Kristin;6962
|
||||||
@ -6,5 +8,3 @@ Kristin;5975
|
|||||||
krisp;4986
|
krisp;4986
|
||||||
krisp;4985
|
krisp;4985
|
||||||
Kristin;4972
|
Kristin;4972
|
||||||
player1;3999
|
|
||||||
Kristin;3992
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user