diff --git a/build/test/cache/input.yml b/build/test/cache/input.yml index 3a17ccd..eefbd61 100644 --- a/build/test/cache/input.yml +++ b/build/test/cache/input.yml @@ -77,10 +77,10 @@ :testfail: ".fail" :dependencies: ".d" :unity: - :vendor_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor" + :vendor_path: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor :defines: [] :cmock: - :vendor_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor" + :vendor_path: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor :defines: [] :includes: [] :mock_prefix: mock_ @@ -99,14 +99,14 @@ :verbosity: 3 :unity_helper: false :cexception: - :vendor_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor" + :vendor_path: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor :defines: [] :test_runner: :includes: [] :file_suffix: _runner :tools: :test_compiler: - :executable: gcc + :executable: gcc.exe :name: default_test_compiler :stderr_redirect: :none :background_exec: :none @@ -132,7 +132,7 @@ :optional: false :arguments: [] :test_linker: - :executable: gcc + :executable: gcc.exe :name: default_test_linker :stderr_redirect: :none :background_exec: :none @@ -148,7 +148,7 @@ - "${4}" - '' :test_file_preprocessor: - :executable: gcc + :executable: gcc.exe :name: default_test_file_preprocessor :stderr_redirect: :none :background_exec: :none @@ -165,7 +165,7 @@ - '"${1}"' - -o "${2}" :test_file_preprocessor_directives: - :executable: gcc + :executable: gcc.exe :name: default_test_file_preprocessor_directives :stderr_redirect: :none :background_exec: :none @@ -181,7 +181,7 @@ - '"${1}"' - -o "${2}" :test_includes_preprocessor: - :executable: gcc + :executable: gcc.exe :name: default_test_includes_preprocessor :stderr_redirect: :none :background_exec: :none @@ -223,13 +223,13 @@ :arguments: [] :plugins: :load_paths: - - "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins" + - C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins :enabled: - stdout_pretty_tests_report - module_generator :display_raw_test_results: false - :stdout_pretty_tests_report_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/stdout_pretty_tests_report" - :module_generator_path: "/var/lib/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/module_generator" + :stdout_pretty_tests_report_path: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/stdout_pretty_tests_report + :module_generator_path: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/lib/../plugins/module_generator :gcov: :reports: - HtmlDetailed diff --git a/build/test/dependencies/cmock.d b/build/test/dependencies/cmock.d index 7d1cf5d..bdf4cc9 100644 --- a/build/test/dependencies/cmock.d +++ b/build/test/dependencies/cmock.d @@ -1,6 +1,6 @@ build/test/out/c/cmock.o: \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.c \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.h \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock_internals.h \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.c \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock.h \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/cmock/src/cmock_internals.h \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/force_build b/build/test/dependencies/force_build new file mode 100644 index 0000000..e69de29 diff --git a/build/test/dependencies/test_casualQuiz_runner.d b/build/test/dependencies/test_casualQuiz_runner.d index 636c727..7d14e54 100644 --- a/build/test/dependencies/test_casualQuiz_runner.d +++ b/build/test/dependencies/test_casualQuiz_runner.d @@ -1,4 +1,4 @@ build/test/out/c/test_casualQuiz_runner.o: \ build/test/runners/test_casualQuiz_runner.c \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/test_quizduell_runner.d b/build/test/dependencies/test_quizduell_runner.d index 39185b6..44b7475 100644 --- a/build/test/dependencies/test_quizduell_runner.d +++ b/build/test/dependencies/test_quizduell_runner.d @@ -1,4 +1,4 @@ build/test/out/c/test_quizduell_runner.o: \ build/test/runners/test_quizduell_runner.c \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/test_timequiz_runner.d b/build/test/dependencies/test_timequiz_runner.d index de707f2..bf1976a 100644 --- a/build/test/dependencies/test_timequiz_runner.d +++ b/build/test/dependencies/test_timequiz_runner.d @@ -1,4 +1,4 @@ build/test/out/c/test_timequiz_runner.o: \ build/test/runners/test_timequiz_runner.c \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/test_wwm_runner.d b/build/test/dependencies/test_wwm_runner.d index 6594640..d12ff22 100644 --- a/build/test/dependencies/test_wwm_runner.d +++ b/build/test/dependencies/test_wwm_runner.d @@ -1,3 +1,3 @@ build/test/out/c/test_wwm_runner.o: build/test/runners/test_wwm_runner.c \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/dependencies/unity.d b/build/test/dependencies/unity.d index e42504d..0baf56c 100644 --- a/build/test/dependencies/unity.d +++ b/build/test/dependencies/unity.d @@ -1,4 +1,4 @@ build/test/out/c/unity.o: \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.c \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ - /var/lib/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.c \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \ + C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h diff --git a/build/test/out/c/cmock.o b/build/test/out/c/cmock.o index 223fe71..44a2da6 100644 Binary files a/build/test/out/c/cmock.o and b/build/test/out/c/cmock.o differ diff --git a/build/test/out/c/test_casualQuiz.o b/build/test/out/c/test_casualQuiz.o index 056d894..be1fc53 100644 Binary files a/build/test/out/c/test_casualQuiz.o and b/build/test/out/c/test_casualQuiz.o differ diff --git a/build/test/out/c/test_casualQuiz_runner.o b/build/test/out/c/test_casualQuiz_runner.o index 9291cc5..6d35d14 100644 Binary files a/build/test/out/c/test_casualQuiz_runner.o and b/build/test/out/c/test_casualQuiz_runner.o differ diff --git a/build/test/out/c/test_quizduell.o b/build/test/out/c/test_quizduell.o index d320de5..90fbcaa 100644 Binary files a/build/test/out/c/test_quizduell.o and b/build/test/out/c/test_quizduell.o differ diff --git a/build/test/out/c/test_quizduell_runner.o b/build/test/out/c/test_quizduell_runner.o index f255dc5..41887ac 100644 Binary files a/build/test/out/c/test_quizduell_runner.o and b/build/test/out/c/test_quizduell_runner.o differ diff --git a/build/test/out/c/test_timequiz.o b/build/test/out/c/test_timequiz.o index 44d422a..8867897 100644 Binary files a/build/test/out/c/test_timequiz.o and b/build/test/out/c/test_timequiz.o differ diff --git a/build/test/out/c/test_timequiz_runner.o b/build/test/out/c/test_timequiz_runner.o index 4ce060a..ad0ae8b 100644 Binary files a/build/test/out/c/test_timequiz_runner.o and b/build/test/out/c/test_timequiz_runner.o differ diff --git a/build/test/out/c/test_wwm.o b/build/test/out/c/test_wwm.o index c1fb4e9..ac97891 100644 Binary files a/build/test/out/c/test_wwm.o and b/build/test/out/c/test_wwm.o differ diff --git a/build/test/out/c/test_wwm_runner.o b/build/test/out/c/test_wwm_runner.o index 8cbff0e..6500951 100644 Binary files a/build/test/out/c/test_wwm_runner.o and b/build/test/out/c/test_wwm_runner.o differ diff --git a/build/test/out/c/unity.o b/build/test/out/c/unity.o index 7978819..b300e29 100644 Binary files a/build/test/out/c/unity.o and b/build/test/out/c/unity.o differ diff --git a/build/test/out/test_casualQuiz.out b/build/test/out/test_casualQuiz.out index 5e23927..aaa1069 100755 Binary files a/build/test/out/test_casualQuiz.out and b/build/test/out/test_casualQuiz.out differ diff --git a/build/test/out/test_quizduell.out b/build/test/out/test_quizduell.out index 1d12660..801da28 100755 Binary files a/build/test/out/test_quizduell.out and b/build/test/out/test_quizduell.out differ diff --git a/build/test/out/test_timequiz.out b/build/test/out/test_timequiz.out index b11a47c..a50bbee 100755 Binary files a/build/test/out/test_timequiz.out and b/build/test/out/test_timequiz.out differ diff --git a/build/test/out/test_wwm.out b/build/test/out/test_wwm.out index 621f189..21dc94f 100755 Binary files a/build/test/out/test_wwm.out and b/build/test/out/test_wwm.out differ diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index f499a71..2b7d717 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.004336156009230763 +:time: 0.04532009999996944 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index c39a5bb..7860d99 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.004334530996857211 +:time: 0.032967900000016925 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index b96e36f..be4fc39 100644 --- a/build/test/results/test_timequiz.pass +++ b/build/test/results/test_timequiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0043847519846167415 +:time: 0.032357900000022255 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 5af2254..f4e43ea 100644 --- a/build/test/results/test_wwm.pass +++ b/build/test/results/test_wwm.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.004366140026831999 +:time: 0.0354631000000154 diff --git a/src/quizduell.h b/src/quizduell.h index 631b6bd..96ec749 100644 --- a/src/quizduell.h +++ b/src/quizduell.h @@ -1,6 +1,31 @@ #ifndef QUIZDUELL_H #define QUIZDUELL_H +#define MAX_FRAGE_LENGTH 100 +#define MAX_ANTWORT_LENGTH 50 +#define MAX_CATEGORIES 3 +#define MAX_QUESTIONS_PER_CATEGORY 3 + +typedef struct { + char frage[MAX_FRAGE_LENGTH]; + char antwortA[MAX_ANTWORT_LENGTH]; + char antwortB[MAX_ANTWORT_LENGTH]; + char antwortC[MAX_ANTWORT_LENGTH]; + char antwortD[MAX_ANTWORT_LENGTH]; + char korrekteAntwort; +} QuizFrage; + +typedef struct { + QuizFrage* fragen; + int anzahlFragen; + int joker; +} Kategorie; + +int pruefeAntwort(QuizFrage frage, char antwort); +QuizFrage erstelleFrage(const char* frage, const char* antwortA, const char* antwortB, const char* antwortC, const char* antwortD, char korrekteAntwort); +int spieleKategorie(Kategorie* kategorie); +void zeigeVerfuegbareKategorien(Kategorie kategorien[]); +void befreieKategorie(Kategorie* kategorie); void quizduell(); #endif // ende QUIZDUELL_H