Author SHA1 Message Date
Niklumm 58ff9f2e63 Merge branch 'main' into bug_fix_branch 2025-12-15 10:48:42 +01:00
Niklumm a4b18d1207 bug fixed 2025-12-15 10:47:32 +01:00
pumcookie ef779381a6 HighScore Final 2025-12-01 14:37:35 +01:00
marcelbls c6cdebfc84 Zähler eingebaut und versucht highscore zu fixen
Zähler eingebaut und versucht highscore zu fixen
2025-12-01 13:11:11 +01:00
pumcookie aa5ca11829 ScoreManager Score Part 2025-11-30 20:36:17 +01:00
Legaeli c0c25360cb Added user interface 2025-11-25 11:24:28 +01:00
Niklumm 9b3e642475 small max cube_count fix 2025-11-23 13:35:52 +01:00
Niklumm 9e5719f8f0 working flexible cube count 2025-11-23 13:31:24 +01:00
Legaeli f0a7363497 fuck your idea 2025-11-18 09:01:46 +01:00
Niklumm edb628f7ba idea changed 2025-11-18 08:58:36 +01:00
Legaeli 4ea94f1917 Test fix. Alles klappt (hoffentlich) 2025-11-18 08:53:50 +01:00
Niklumm d06404f865 FInal ohne .idea im git ignore
Test weil es chris fickt
2025-11-18 08:48:40 +01:00
Niklumm 79f97d6121 FINALFINALFINAL
es klappt nicht anfassen
2025-11-18 08:47:23 +01:00
Niklumm 784f75f4db Update .gitignore 2025-11-17 16:05:22 +01:00
Niklumm 9873b963fa Merge branch 'main' of https://git.efi.th-nuernberg.de/gitea/guballaro99746/Stone_Development 2025-11-17 16:03:54 +01:00
pumcookie 7dacd91b32 finalev2 2025-11-17 15:34:05 +01:00
pumcookie 4d2df95404 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	.idea/workspace.xml
2025-11-17 15:33:29 +01:00
marcelbls 1527b661ea Merge branch 'main' of https://git.efi.th-nuernberg.de/gitea/guballaro99746/Stone_Development 2025-11-17 15:33:31 +01:00
marcelbls b1a825b386 update 2025-11-17 15:33:21 +01:00
pumcookie c002d7dd4b Merge branch 'refs/heads/project_tests'
# Conflicts:
#	.idea/workspace.xml
#	CMakeLists.txt
#	tests.cpp
2025-11-17 15:32:15 +01:00
pumcookie 72aac0894d trying merge 2025-11-17 15:23:42 +01:00
marcelbls 6b8e5f7204 Cmake List update 2025-11-17 15:11:42 +01:00
marcelbls 480fd67817 Merge branch 'main' into project_tests 2025-11-17 15:09:56 +01:00
marcelbls 366f7b1c37 updated 2025-11-17 15:08:48 +01:00
pumcookie 0da8b5ee41 Merge remote-tracking branch 'origin/main' 2025-11-17 15:07:56 +01:00
marcelbls cdc533c586 updated 2025-11-17 15:03:34 +01:00
Legaeli aac593edb3 Gitignore 2025-11-17 15:02:40 +01:00
guballaro99746 b73ba1a0e0 Merge branch 'project_tests'
# Conflicts:
#	cmake-build-debug/Prog3B.exe
#	cmake-build-debug/Testing/Temporary/LastTest.log
2025-11-17 15:00:11 +01:00
marcelbls d4ceaeb516 lles wieder da 2025-11-17 14:59:21 +01:00
marcelbls b48ce207fc Merge branch 'main' of https://git.efi.th-nuernberg.de/gitea/guballaro99746/Stone_Development 2025-11-17 14:58:35 +01:00
marcelbls ca71990a2d Alles weg 2025-11-17 14:58:22 +01:00
guballaro99746 c9701664ae gitignore 2025-11-17 14:53:50 +01:00
marcelbls ca3f80284c update 2025-11-17 14:24:28 +01:00
guballaro99746 35e35cad9b gitignore 2025-11-17 14:19:36 +01:00
guballaro99746 8c67791c90 gitignore 2025-11-17 14:14:50 +01:00
guballaro99746 2822ce206e gitignore 2025-11-17 14:14:32 +01:00
guballaro99746 92e4646f11 Finale 2025-11-17 14:07:46 +01:00
guballaro99746 873ec1d29c Finale 2025-11-17 13:15:20 +01:00
guballaro99746 09ec5b288e Merge remote-tracking branch 'refs/remotes/origin/project_tests'
# Conflicts:
#	CMakeLists.txt
#	cmake-build-debug/CMakeFiles/3.30.5/CMakeDetermineCompilerABI_C.bin
#	cmake-build-debug/CMakeFiles/3.30.5/CMakeDetermineCompilerABI_CXX.bin
#	cmake-build-debug/CMakeFiles/3.30.5/CompilerIdC/a.exe
#	cmake-build-debug/CMakeFiles/3.30.5/CompilerIdCXX/a.exe
#	cmake-build-debug/CMakeFiles/CMakeConfigureLog.yaml
#	cmake-build-debug/CMakeFiles/clion-Debug-log.txt
#	cmake-build-debug/Prog3B.exe
#	cmake-build-debug/Testing/Temporary/LastTest.log
#	cmake-build-debug/compile_commands.json
2025-11-17 13:14:48 +01:00
guballaro99746 c72b95036d Kurz vor Finale 2025-11-17 13:12:52 +01:00
guballaro99746 3625bf2506 Merge remote-tracking branch 'origin/project_developer' 2025-11-17 13:12:07 +01:00
guballaro99746 1ff4c9397c Merge branch 'architect'
# Conflicts:
#	cmake-build-debug/CMakeFiles/Prog3B.dir/gamecube.cpp.obj
#	cmake-build-debug/CMakeFiles/Prog3B.dir/main.cpp.obj
#	cmake-build-debug/Prog3B.exe
#	cmake-build-debug/Testing/Temporary/LastTest.log
2025-11-17 13:11:47 +01:00
marcelbls 7c8ea0c30e update Test.cpp 2025-11-17 09:30:31 +01:00
marcelbls 9e322748dc Tests implementiert 2025-11-17 09:26:31 +01:00
guballaro99746 27ea219f41 Backup 2025-11-16 17:57:29 +01:00
marcelbls 86776f70bc commit for merge 2025-11-03 15:25:36 +01:00
marcelbls dd23eef896 Update tests.cpp 2025-11-03 15:18:36 +01:00
marcelbls 5a8a8ab255 Cmake List angepasst 2025-11-03 15:17:20 +01:00
guballaro99746 42649ea0db ANFORDERUNGEN 2025-11-03 15:16:26 +01:00
marcelbls 85c69bf196 Cmake list angepasst 2025-11-03 15:11:59 +01:00
marcelbls 99f3b60261 Test.cpp erstellt und Cmake angepasst 2025-11-03 14:57:34 +01:00
guballaro99746 fd43435619 Merge branch 'main' of https://git.efi.th-nuernberg.de/gitea/guballaro99746/Stone_Development into project_leader 2025-11-03 14:52:54 +01:00
marcelbls 1f6cb722f8 Merge branch 'main' into project_tests 2025-11-03 14:46:25 +01:00
guballaro99746 1a1f0d56cd Requirements 2025-11-03 14:38:43 +01:00
marcelbls 3b0da0a8a5 Neue test.txt Datei
Neue test.txt Datei
2025-11-03 14:33:44 +01:00
21 changed files with 6631 additions and 203 deletions
+2 -2
View File
@@ -1,3 +1,3 @@
cmake-build-debug-mingw/
cmake-build-debug/
.idea/git rm
cmake-build-debug-mingw/
.idea/workspace.xml
-8
View File
@@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
-97
View File
@@ -240,103 +240,6 @@
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexRemoved" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexRemoved" />
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Stone_Development.iml" filepath="$PROJECT_DIR$/.idea/Stone_Development.iml" />
</modules>
</component>
</project>
+139
View File
@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="BackendCodeEditorMiscSettings">
<option name="/Default/RiderDebugger/RiderRestoreDecompile/RestoreDecompileSetting/@EntryValue" value="false" type="bool" />
<option name="/Default/Housekeeping/GlobalSettingsUpgraded/IsUpgraded/@EntryValue" value="true" type="bool" />
<option name="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=SwitchToGoToActionSuggester/@EntryIndexedValue" value="true" type="bool" />
</component>
<component name="CMakePresetLoader">{
&quot;useNewFormat&quot;: true
}</component>
<component name="CMakeProjectFlavorService">
<option name="flavorId" value="CMakePlainProjectFlavor" />
</component>
<component name="CMakeReloadState">
<option name="reloaded" value="true" />
</component>
<component name="CMakeRunConfigurationManager">
<generated>
<config projectName="Prog3B" targetName="Prog3B" />
<config projectName="Prog3B" targetName="Prog3B_tests" />
</generated>
</component>
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="db070755-9708-4a46-a9cb-e7c4dc1bfb77" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gamecube.h" beforeDir="false" afterPath="$PROJECT_DIR$/gamecube.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/main.cpp" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ClangdSettings">
<option name="formatViaClangd" value="false" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
</component>
<component name="ProjectApplicationVersion">
<option name="ide" value="CLion" />
<option name="majorVersion" value="2024" />
<option name="minorVersion" value="3.4" />
<option name="productBranch" value="Classic" />
</component>
<component name="ProjectColorInfo">{
&quot;customColor&quot;: &quot;&quot;,
&quot;associatedIndex&quot;: 1
}</component>
<component name="ProjectId" id="35dvDDehATN0hwwCgiPHEpDQPia" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;CMake Application.Prog3B.executor&quot;: &quot;Run&quot;,
&quot;RunOnceActivity.RadMigrateCodeStyle&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;RunOnceActivity.readMode.enableVisualFormatting&quot;: &quot;true&quot;,
&quot;RunOnceActivity.west.config.association.type.startup.service&quot;: &quot;true&quot;,
&quot;cf.first.check.clang-format&quot;: &quot;false&quot;,
&quot;cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;bug__fix__branch&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Desktop/StudiumME/3.Sem/Prog3/B/MatrixPybind&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
<component name="RunManager" selected="CMake Application.Prog3B">
<configuration name="Prog3B" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Prog3B" TARGET_NAME="Prog3B" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="Prog3B" RUN_TARGET_NAME="Prog3B">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="Prog3B_tests" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Prog3B" TARGET_NAME="Prog3B_tests" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="Prog3B" RUN_TARGET_NAME="Prog3B_tests">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="CMake Application.Prog3B" />
<item itemvalue="CMake Application.Prog3B_tests" />
</list>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="db070755-9708-4a46-a9cb-e7c4dc1bfb77" name="Changes" comment="" />
<created>1763452643165</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1763452643165</updated>
<workItem from="1763452645145" duration="329000" />
<workItem from="1763652636624" duration="1226000" />
<workItem from="1763653877709" duration="28000" />
<workItem from="1763895078693" duration="5675000" />
<workItem from="1764526482502" duration="8000" />
<workItem from="1764526493477" duration="4519000" />
<workItem from="1765791349412" duration="635000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="VCPKGProject">
<isAutomaticCheckingOnLaunch value="false" />
<isAutomaticFoundErrors value="true" />
<isAutomaticReloadCMake value="true" />
</component>
</project>
+6
View File
@@ -16,6 +16,10 @@ set(SRC_FILES
${CMAKE_CURRENT_LIST_DIR}/main.cpp
${CMAKE_CURRENT_LIST_DIR}/gamecube.cpp
${CMAKE_CURRENT_LIST_DIR}/gamematrix.cpp
${CMAKE_CURRENT_LIST_DIR}/createCube.cpp
${CMAKE_CURRENT_LIST_DIR}/userinterface.cpp
${CMAKE_CURRENT_LIST_DIR}/raygui_impl.cpp
${CMAKE_CURRENT_LIST_DIR}/ScoreManager.cpp
)
set(INCLUDE_DIRS
@@ -68,3 +72,5 @@ if(APPLE)
)
endif()
add_executable(Prog3B_tests tests.cpp)
set_target_properties(Prog3B_tests PROPERTIES WIN32_EXECUTABLE OFF)
+2
View File
@@ -0,0 +1,2 @@
score 99
time 99999.99
+72
View File
@@ -0,0 +1,72 @@
#include "ScoreManager.h"
#include <fstream>
#include <iostream>
ScoreManager::ScoreManager(const std::string& filename) : highscoreFile(filename) {
loadHighscore();
}
void ScoreManager::loadHighscore() {
std::ifstream file(highscoreFile);
if (!file.is_open()) {
std::cout << "No highscore file found, creating new file.\n";
highScore = 9999;
bestTime = 99999.99;
return;
}
std::string key;
while (file >> key) {
if (key == "score") file >> highScore;
else if (key == "time") file >> bestTime;
}
file.close();
// If file contains useless values (like old format), reset
if (highScore <= 0 || highScore > 9999) highScore = 9999;
if (bestTime <= 0 || bestTime > 99999.99) bestTime = 99999.99;
}
void ScoreManager::incrementScore() {
currentScore++;
}
void ScoreManager::resetScore() {
currentScore = 0;
}
void ScoreManager::saveHighScore(int finalScore, double finalTime) {
bool updated = false;
if (finalScore < highScore) {
highScore = finalScore;
updated = true;
}
if (finalTime < bestTime) {
bestTime = finalTime;
updated = true;
}
// For safety: If file was default → always write
if (highScore == 9999 && bestTime == 99999.99)
updated = true;
if (!updated) return;
std::ofstream file(highscoreFile);
if (!file.is_open()) {
std::cerr << "❌ ERROR: Can't write highscore file\n";
return;
}
file << "score " << highScore << "\n";
file << "time " << bestTime << "\n";
file.close();
std::cout << "✅ Highscore updated!\n";
}
+25
View File
@@ -0,0 +1,25 @@
#pragma once
#include <string>
#include <limits>
class ScoreManager {
public:
ScoreManager(const std::string& filename);
void incrementScore();
void resetScore();
void saveHighScore(int finalScore, double finalTime);
int getCurrentScore() const { return currentScore; }
int getHighScore() const { return highScore; }
double getBestTime() const { return bestTime; }
private:
int currentScore = 0;
int highScore = std::numeric_limits<int>::max();
double bestTime = std::numeric_limits<double>::max();
std::string highscoreFile;
void loadHighscore();
};
+64
View File
@@ -0,0 +1,64 @@
#include "createCube.h"
#include <iostream>
std::vector<Vec3> createCubes(int pairs)
{
std::vector<int> fieldSize = calculateFieldSize(pairs);
std::vector<Vec3> cubePositions;
//std::cout<<(fieldSize[0])<<std::endl;
//std::cout<<(fieldSize[1]) <<std::endl;
int start_x = (fieldSize[0]/2) * -2;
int start_y = (fieldSize[1]/2) * -2;
for (int i = 0; i < fieldSize[0]; i++)
{
for (int j = 0; j < fieldSize[1]; j++)
{
cubePositions.push_back(Vec3(start_x + 2*i, 0, start_y + 2*j));
}
}
return cubePositions;
};
std::vector<int> calculateFieldSize(int pairs)
{
std::vector<int> best_field = {pairs, 2};
int cube_count = pairs *2;
int test_count = 3;
while (test_count < pairs)
{
for (int i = 3; i < pairs; i++)
{
if (test_count * i == cube_count && test_count + i < best_field[0] + best_field[1])
{
best_field[1] = test_count;
best_field[0] = i;
}
}
test_count++;
}
return best_field;
};
std::vector<Color> getColors(int pairs)
{
std::vector<Color> returnColors;
Color colors[] = {
{230, 25, 75, 255}, // Red
{60, 180, 75, 255}, // Green
{0, 130, 200, 255}, // Blue
{245, 130, 48, 255}, // Orange
{145, 30, 180, 255}, // Purple
{255, 225, 25, 255}, // Yellow
{70, 240, 240, 255}, // Cyan
{240, 50, 230, 255}, // Magenta
{210, 245, 60, 255}, // Lime
{250, 190, 190, 255} // Pink
};
for (int i = 0; i < pairs; i++)
{
returnColors.push_back(colors[i]);
}
std::cout << returnColors.size() << std::endl;
return returnColors;
};
+11
View File
@@ -0,0 +1,11 @@
#pragma once
#include "gamecube.h"
std::vector<Vec3> createCubes(int pairs);
std::vector<Color> getColors(int pairs);
std::vector<int> calculateFieldSize(int pairs);
-75
View File
@@ -1,75 +0,0 @@
========================================================
Projekt: gamematrix (C++ Library)
Rolle: Architekt
Datei: design.txt
Datum: 03.11
Team: Stone_Development
========================================================
# ----------------------------
# 1. Projektstruktur / Namespace
# ----------------------------
Namespace: Matrix3D
Ziel: Saubere Trennung der Bibliothek, Vermeidung von Namenskonflikten.
Beispiel:
namespace Matrix3D {
// Funktionen, ggf Klasse(n)
}
# ----------------------------
# 2. Datenstrukturen / Klassen
# ----------------------------
Listen Sie die Klassen oder Structs auf, die verwendet werden:
| Name | Typ | Beschreibung |
|--------|------------------------------------------|--------------|
| Vec3 | struct Vec3 | 3D-Vektor (x, y, z) |
| Mat4 | std::array<std::array<double,4>,4> | 4x4-Matrix (homogen) |
| ______ | ________ | ___________________ |
| ______ | ________ | ___________________ |
# ----------------------------
# 3. Operatoren / Templates
# ----------------------------
Welche Operatoren oder Templates sollen definiert werden?
- Templates für unterschiedliche Datentypen? x Ja
- Operatoren:
- Mat4 * Mat4
- Mat4 * Vec3
# ----------------------------
# 4. Funktionen / Schnittstellen
# ----------------------------
Liste der Funktionen mit Eingabe/Ausgabe und kurzer Beschreibung:
| Funktion | Eingabe | Ausgabe | Kurzbeschreibung |
|---------------|------------------------------------|-----------------------|----------------------------------------|
| matmul | Mat4 A, Mat4 B | Mat4 | Matrixmultiplikation 4x4 |
| translate | Vec3 pos | Mat4 | Verschiebungstransformation |
| rot3D | double angle_deg, char axis | Mat4 | Rotation um Achse x/y/z | |
| _____________ | __________________________________ | ____________________ | ______________________________ |
# ----------------------------
# 5. Designentscheidungen / Hinweise
# ----------------------------
- Rückgabe der Matrizen per Wert oder Referenz? Rückgabe
- Verwendung von std::array oder std::vector? std::array
- Homogene Koordinaten für Translation / Rotation (4x4)? ☐ Ja
- Weitere Designüberlegungen: ___________________________
# ----------------------------
# 6. Deliverables / Milestones
# ----------------------------
- design.txt fertig und im Branch architect committed
- Übergabe an Entwickler für Implementierung
========================================================
Hinweis:
- Dieses Dokument dient als Grundlage für die Implementierung.
- Alle Designentscheidungen sollen klar nachvollziehbar sein.
========================================================
test
+8
View File
@@ -32,3 +32,11 @@ private:
bool flippingBackward = false;
float rotation = 0.0f;
};
enum class GameState
{
Idle, // kein Würfel offen, Eingabe erlaubt
OneFlipped, // ein Würfel offen
CheckingMatch, // zwei Würfel vollständig aufgeklappt, Vergleich läuft
LockInput // Würfel drehen gerade – Eingabe kurz blockiert
};
+94 -14
View File
@@ -1,36 +1,68 @@
#include "gamecube.h"
#include "createCube.h"
#include "userinterface.h"
#include <algorithm>
#include <ctime>
#include <iostream>
#include "ScoreManager.h"
// -----------------------------------------------------------
// 3D Memory Game – Hauptprogramm
// -----------------------------------------------------------
int main()
{
UserInterface userInterface;
ScoreManager score("Highscores.txt");
//CHRIS WAR HIER
//AXIOM WAR HIER
// Zufall initialisieren
srand(time(NULL));
// Fenster und Kamera
InitWindow(800, 600, "3D Memory Game with Matrix3D Library");
SetTargetFPS(60);
Camera3D camera{};
camera.position = {6.0f, 6.0f, 6.0f};
camera.position = {8.0f, 8.5f, 8.0f};
camera.target = {0.0f, 0.0f, 0.0f};
camera.up = {0.0f, 1.0f, 0.0f};
camera.fovy = 45.0f;
camera.projection = CAMERA_PERSPECTIVE;
// Nur 3 Farben für 3 Paare
Color colors[] = { RED, GREEN, BLUE };
GameState state = GameState::Idle;
//TODO: Hier die Zeit abrufen.
double currentScoreTime = 0.0;
double startTime = 0.0;
double highScoreTime = score.getBestTime();
//TODO: Hier die Anzahl der Züge abrufen.
int currentScoreTurns = 0;
int highScoreTurns = score.getHighScore();
//if (currentScoreTime <= highScoreTime) highScoreTime = currentScoreTime;
//if (currentScoreTime <= highScoreTurns) highScoreTurns = currentScoreTurns;
int cubePairs = userInterface.getCubeCount();
if (cubePairs <= 0) {
userInterface.showMenu(currentScoreTime, highScoreTime, currentScoreTurns, highScoreTurns);
cubePairs = userInterface.getCubeCount();
// Startzeit speichern nach Enter
startTime = currentScoreTime;
}
std::vector<Vec3> positions =createCubes(cubePairs);
// Nur x Farben für x Paare
std::vector<Color> colors= getColors(cubePairs);
// 6 Karten-Positionen im 3x2 Raster
std::vector<Vec3> positions = {{-2, 0, -2}, {0, 0, -2}, {2, 0, -2},{-2, 0, 0}, {0, 0, 0}, {2, 0, 0}};
// Farben doppelt in einen Pool legen und mischen
std::vector<Color> colorPool;
for (int i = 0; i < 3; i++)
for (int i = 0; i < cubePairs; i++)
{
colorPool.push_back(colors[i]);
colorPool.push_back(colors[i]);
@@ -45,7 +77,7 @@ int main()
// Karten/Würfel erstellen
std::vector<gamecube> cubes;
for (int i = 0; i < 6; i++)
for (int i = 0; i < cubePairs*2; i++)
cubes.emplace_back(positions[i], colorPool[i]);
gamecube* first = nullptr;
@@ -59,7 +91,11 @@ int main()
while (!WindowShouldClose())
{
// Klick-Erkennung
if (!gameWon && IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
//if (!gameWon && IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
if (!gameWon
&& state != GameState::LockInput
&& state != GameState::CheckingMatch
&& IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
{
Vector2 mouse = GetMousePosition();
@@ -70,7 +106,27 @@ int main()
Vector2 screenPos = GetWorldToScreen({c.GetPosition().x, c.GetPosition().y, c.GetPosition().z}, camera);
if (fabs(mouse.x - screenPos.x) < 40 && fabs(mouse.y - screenPos.y) < 40)
{
if (state == GameState::OneFlipped && first == &c)
break;
c.FlipForward();
if (state == GameState::Idle)
{
first = &c;
state = GameState::OneFlipped;
}else if (state == GameState::OneFlipped && first != &c)
{
second = &c;
state = GameState::LockInput;
}
score.incrementScore();
currentScoreTurns = score.getCurrentScore() / 2;
break;
}
}
}
}
@@ -79,18 +135,21 @@ int main()
for (auto &c : cubes)
{
c.Update(flipSpeed);
}
// Sobald ein Würfel vollständig umgedreht ist → merken
if (c.IsFlipped() && !c.IsMatched())
if (state == GameState::LockInput && first && second)
{
if (!first) first = &c;
else if (!second && &c != first) second = &c;
if (first->GetRotationY() == 180.0f && second->GetRotationY() == 180.0f)
{
state = GameState::CheckingMatch;
}
}
// Matching-Logik
if (first && second)
if (state == GameState::CheckingMatch && first && second)
{
//currentScoreTurns = score.getCurrentScore();
Color col1 = first->GetColor();
Color col2 = second->GetColor();
@@ -106,15 +165,25 @@ int main()
}
first = second = nullptr;
state = GameState::Idle;
std::cout <<"unlock";
}
// Gewinnprüfung
if (!gameWon)
gameWon = std::all_of(cubes.begin(), cubes.end(), [](const gamecube &c){ return c.IsMatched(); });
//Zeit Berechnung
if (!gameWon)
{
currentScoreTime = GetTime() - startTime;
DrawText(TextFormat("%.2f", currentScoreTime), 10, 30, 20, DARKGRAY);
}
// -----------------------------------------------------------
// Zeichnen
// -----------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
BeginMode3D(camera);
@@ -124,11 +193,22 @@ int main()
EndMode3D();
if (gameWon)
if (gameWon) {
DrawText("Congrats! You found all pairs!", 150, 260, 30, DARKBLUE);
//TODO: Neue Scores zuweisen, current genügen.
//currentScoreTime = 17.3;
//currentScoreTurns = 10;
if (currentScoreTime <= highScoreTime) highScoreTime = currentScoreTime;
if (currentScoreTurns <= highScoreTurns) highScoreTurns = currentScoreTurns;
score.saveHighScore(currentScoreTurns, currentScoreTime);
userInterface.showScore(currentScoreTime, highScoreTime, currentScoreTurns, highScoreTurns);
}
else
DrawText("Flip 2 cubes - find matching pairs!", 10, 10, 20, DARKGRAY);
EndDrawing();
}
+2
View File
@@ -0,0 +1,2 @@
#define RAYGUI_IMPLEMENTATION
#include "raygui.h"
+5994
View File
File diff suppressed because it is too large Load Diff
+12 -7
View File
@@ -23,10 +23,8 @@ Tragen Sie ein: Funktion, Eingabe, Ausgabe, kurze Beschreibung
| Funktion | Eingabe, Kurzbeschreibung | Ausgabe | |
|---------------|------------------------------------|-----------------------|----------------------------------------|
| matmul | 4x4 Matrix A, 4x4 Matrix B | 4x4 Matrix | _____________________________________ |
| translate | 3D Vektor | 4x4 Matrix | _____________________________________ |
| rot3D | Winkel in °, Rotationsachse (x/y/z)| 4x4 Matrix | _____________________________________ |
| _____________ | __________________________________ | ____________________ | ______________________________ |
| _____________ | __________________________________ | ____________________ | ______________________________ |
| translate | 3D Vektor | 4x4 Matrix | __________________________
| rot3D | Winkel in °, Rotationsachse (x/y/z)| 4x4 Matrix |
# ----------------------------
# 3. Nicht-funktionale Anforderungen
@@ -58,7 +56,14 @@ Wie soll geprüft werden, dass die Anforderungen erfüllt sind?
- Matrizenmultiplikation
========================================================
Hinweis:
- Diese Datei wird vom Projektleiter erstellt und gepflegt.
- Jede Phase des Projekts soll hier dokumentiert werden.
1. Anforderungsanalyse:
-Erforderliche Maßnahmen dokumentiert und an die Mitarbeiter übergeben.
-Sinnvolle Testfälle entworfen
2. Design/ Entwurf:
-Komponenten von den benötigten Klassen festgehalten und dokumentiert
-Testplan erstellt und CMakeLists.txt angepasst
3. Implementierung:
-Nötige Funktionen erfolgreich implementiert
-Funktionen dokumentiert
4.
========================================================
+53
View File
@@ -0,0 +1,53 @@
#include <cassert>
#include <cmath>
#include <iostream>
#include "gamematrix.cpp"
void test_matmul_basic() {
std::array<std::array<double,4>,4> A = {{
{1, 0, 0, 0},
{0, 1, 0, 0},
{0, 0, 1, 0},
{0, 0, 0, 1}
}};
std::array<std::array<double,4>,4> B = {{
{2, 3, 4, 5},
{1, 1, 1, 1},
{0, 0, 0, 0},
{7, 7, 7, 7}
}};
auto C = Matrix3D::gameMatrix::matmul(A, B);
assert(C[0][0] == 2);
assert(C[0][1] == 3);
assert(C[1][0] == 1);
assert(C[3][3] == 7);
}
void test_translate_basic() {
std::array<double, 3> pos = {3, -2, 8};
auto T = Matrix3D::gameMatrix::translate(pos);
assert(T[0][3] == 3);
assert(T[1][3] == -2);
assert(T[2][3] == 8);
}
void test_rot3D_basic() {
auto R = Matrix3D::gameMatrix::rot3D(90, 'x');
// cos(90°) ≈ 0, sin(90°) ≈ 1
assert(std::abs(R[1][1]) < 1e-6);
assert(std::abs(R[1][2] + 1.0) < 1e-6);
}
int main() {
test_matmul_basic();
test_translate_basic();
test_rot3D_basic();
std::cout << "Test bestanden!\n";
return 0;
}
+42
View File
@@ -0,0 +1,42 @@
========================================================
Projekt: gamematrix (C++ Library)
Rolle: Tester
Datei: tests.txt
Datum: ____________________
Team: ____________________
========================================================
# ----------------------------
# 1. Testplan Übersicht
# ----------------------------
Ziel: Überprüfung der Funktionen matmul(), translate(), rot3D().
| Funktion | Testfall | Eingabe | Erwartetes Ergebnis | Bemerkung |
|---------------|---------------------------|------------------------------|-----------------------------------|----------------------------|
| matmul | Identity * Identity | 4x4 Identity Matrizen | Identity | Basisfall |
| matmul | Beispielmatrizen | A=[[...]], B=[[...]] | C=[[...]] | Prüfen mit Handrechnung |
| translate | Verschiebung | Vec3 {1,2,3} | Matrix mit Translation 1,2,3 | Prüfen letzte Spalte |
| rot3D | Rotation Z 90° | angle_deg=90, axis='z' | (1,0,0) -> (0,1,0) | Prüfen Anwendung auf Vektor|
| rot3D | Rotation X 180° | angle_deg=180, axis='x' | (0,1,0) -> (0,-1,0) | Prüfen Anwendung auf Vektor|
| rot3D | Rotation Y 270° | angle_deg=270, axis='y' | (1,0,0) -> (0,0,-1) | Prüfen Anwendung auf Vektor|
# ----------------------------
# 2. Testdaten / Matrizen
# ----------------------------
- Matrizen für matmul: Identity, Beispiel A/B Matrizen
- Vektoren für translate: Vec3 {x, y, z}
- Vektoren für rot3D: Vec3 {1,0,0}, Vec3 {0,1,0}
# ----------------------------
# 3. Abnahmekriterien
# ----------------------------
- Alle Unit-Tests erfolgreich
- Keine Exceptions außer gewollt (z. B. ungültige Achse)
- Testbericht in tests.txt dokumentiert
========================================================
Hinweis:
- Diese Datei wird vom Tester gepflegt.
- Tester dokumentiert Input, Output, erwartetes Ergebnis und Erfolg/Fehler.
========================================================
+77
View File
@@ -0,0 +1,77 @@
#include "userinterface.h"
#include "raylib.h"
#include "raygui.h"
#include <iostream>
#include <cstring>
#include <format>
int UserInterface::getCubeCount() {
return cubeCount;
};
void UserInterface::showMenu(double &currentScoreTime, double &highScoreTime, int &currentScoreTurns, int &highScoreTurns) {
char textInput[3] = "3";
menuOpen = true;
Rectangle inputBox = {300, 250, 200, 50};
while (menuOpen && !WindowShouldClose()) {
BeginDrawing();
ClearBackground(RAYWHITE);
showScore(currentScoreTime, highScoreTime, currentScoreTurns, highScoreTurns);
if (wrongInput) {
DrawText("Falsche Eingabe.\nWie viele Würfelpaare? (2-10)", 220, 180, 20, DARKGRAY);
} else {
DrawText("Wie viele Würfelpaare? (2-10)", 220, 180, 20, DARKGRAY);
}
GuiTextBox(inputBox, textInput, 3, true);
if (IsKeyPressed(KEY_ENTER)) {
if (!(std::atoi(textInput) > 10 || std::atoi(textInput) <= 1)) {
menuOpen = false;
cubeCount = std::atoi(textInput);
currentScoreTime = GetTime();
} else {
wrongInput = true;
}
}
EndDrawing();
}
}
void UserInterface::showScore(double &currentScoreTime, double &highScoreTime, int &currentScoreTurns, int &highScoreTurns) {
Color currentScoreTimeColor = RED;
Color highScoreTimeColor = GREEN;
Color currentScoreTurnsColor = RED;
Color highScoreTurnsColor = GREEN;
if (currentScoreTime <= highScoreTime) {
currentScoreTimeColor = GREEN;
} else if (currentScoreTime < highScoreTime) {
currentScoreTimeColor = RED;
}
if (currentScoreTurns <= highScoreTurns) {
currentScoreTurnsColor = GREEN;
} else if (currentScoreTurns > highScoreTurns) {
currentScoreTurnsColor = RED;
}
if (!menuOpen) {
std::string currentTimeOutput = std::format("Deine Zeit: {:.2f}", currentScoreTime);
DrawText(currentTimeOutput.c_str(), 220, 100, 20, currentScoreTimeColor);
std::string currentTurnsOutput = "Deine Züge: " + std::to_string(currentScoreTurns);
DrawText(currentTurnsOutput.c_str(), 440, 100, 20, currentScoreTurnsColor);
}
std::string highTimeOutput = std::format("Beste Zeit: {:.2f}", highScoreTime);
DrawText(highTimeOutput.c_str(), 220, 120, 20, highScoreTimeColor);
std::string highTurnsOutput = "Wenigste Züge: " + std::to_string(highScoreTurns);
DrawText(highTurnsOutput.c_str(), 440, 120, 20, highScoreTurnsColor);
}
+20
View File
@@ -0,0 +1,20 @@
#pragma once
class UserInterface {
public:
int getCubeCount();
void showMenu(double &currentScoreTime, double &highScoreTime, int &currentScoreTurns, int &highScoreTurns);
void showScore(double &currentScoreTime, double &highScoreTime, int &currentScoreTurns, int &highScoreTurns);
bool menuOpen = false;
private:
int cubeCount = 0;
bool wrongInput = false;
};
#ifndef USERINTERFACE_H
#define USERINTERFACE_H
#endif //USERINTERFACE_H