Änderung highscores.txt automatisch löschen
This commit is contained in:
parent
7683a157c9
commit
2cf8b6b149
@ -69,7 +69,8 @@ TreeNode *addToTree(TreeNode *root, const void *data, size_t dataSize,
|
||||
// direction. Use your implementation of a stack to organize the iterator. Push
|
||||
// the root node and all left nodes first. On returning the next element, push
|
||||
// the top node and push all its left nodes.
|
||||
void *nextTreeData(TreeNode *root) {
|
||||
void *nextTreeData(
|
||||
TreeNode *root) { // highscore nutzt Funktion für die Ausgabe der Punktzahl
|
||||
static StackNode *stack = NULL; // static -> behält Wert bei mehreren Aufrufen
|
||||
|
||||
// Neue Iteration starten
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
Kristin;49209
|
||||
krisp;29797
|
||||
krisp;29792
|
||||
Kristin;29782
|
||||
Kristin;19943
|
||||
krisp;19934
|
||||
krisp;19916
|
||||
kristin;19861
|
||||
Kristin;19858
|
||||
p;19729
|
||||
4
main.c
4
main.c
@ -3,7 +3,7 @@
|
||||
#include "timer.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <time.h> // für Zufallszahlen hinzugefügt
|
||||
|
||||
// Read an unsigned integer from stdin with prompt (retries until valid).
|
||||
int inputNumber(const char *promptText) {
|
||||
@ -35,7 +35,7 @@ void showNumbers(const unsigned int *numbers, unsigned int len) {
|
||||
// Main game loop: generate numbers, ask user for duplicate, measure time,
|
||||
// update highscores.
|
||||
int main(int argc, char *argv[]) {
|
||||
srand(time(NULL)); // seed für srand
|
||||
srand(time(NULL)); // seed für srand nachträglich eingefügt
|
||||
int exitCode = EXIT_FAILURE;
|
||||
|
||||
if (argc != 2) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user