From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../Prakt1/prg2p1/mastermind/Debug/mastermind.ilk | Bin 0 -> 886637 bytes .../Prakt1/prg2p1/mastermind/Debug/mastermind.pch | Bin 0 -> 2040260 bytes .../Prakt1/prg2p1/mastermind/Debug/mastermind.pdb | Bin 0 -> 1363124 bytes .../Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.idb | Bin 0 -> 83028 bytes .../Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.pdb | Bin 0 -> 111517 bytes Bachelor/Prog2/Prakt1/prg2p1/mastermind/main.cpp | 73 ++++++++++++++ .../Prog2/Prakt1/prg2p1/mastermind/mastermind.cpp | 0 .../Prog2/Prakt1/prg2p1/mastermind/mastermind.dsp | 108 +++++++++++++++++++++ .../Prog2/Prakt1/prg2p1/mastermind/mastermind.dsw | 33 +++++++ .../Prog2/Prakt1/prg2p1/mastermind/mastermind.h | 0 .../Prog2/Prakt1/prg2p1/mastermind/mastermind.ncb | Bin 0 -> 50210 bytes .../Prog2/Prakt1/prg2p1/mastermind/mastermind.opt | Bin 0 -> 54462 bytes .../Prog2/Prakt1/prg2p1/mastermind/mastermind.plg | 33 +++++++ 13 files changed, 247 insertions(+) create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.ilk create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pch create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pdb create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.idb create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.pdb create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/main.cpp create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.cpp create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsp create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsw create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.h create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.ncb create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.opt create mode 100644 Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.plg (limited to 'Bachelor/Prog2/Prakt1/prg2p1/mastermind') diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.ilk b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.ilk new file mode 100644 index 0000000..21a3bcf Binary files /dev/null and b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.ilk differ diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pch b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pch new file mode 100644 index 0000000..b36b80f Binary files /dev/null and b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pch differ diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pdb b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pdb new file mode 100644 index 0000000..8338416 Binary files /dev/null and b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pdb differ diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.idb b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.idb new file mode 100644 index 0000000..c0885b9 Binary files /dev/null and b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.idb differ diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.pdb b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.pdb new file mode 100644 index 0000000..0d436a6 Binary files /dev/null and b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.pdb differ diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/main.cpp b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/main.cpp new file mode 100644 index 0000000..c981178 --- /dev/null +++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/main.cpp @@ -0,0 +1,73 @@ +#include +#include +#include +#include "mastermind.h" + +using std::cout; +using std::cin; +using std::endl; + +const int MAXROUND=8; + +void playRound(MastermindDigits&); + +int main() +{ + int menuSel=0; + int input=0; + + MastermindDigits game; + + srand(time(0)); + + do { + system ("cls"); + cout << "1: Spiel" << endl; + cout << "2: Testmodus" << endl; + cout << "Ende: beliebige Taste"<> menuSel; + switch (menuSel) + { + case 1 : + { + game.makeDigitsToGuess(); + playRound(game); + break; + } + case 2: + { + cout << "Please enter test values (1111 - 6666): "; + cin >> input; + MastermindDigits testGame(input); + playRound(testGame); + break; + } + default: menuSel=0; + } + + } while (menuSel!=0); + + return 0; +} + +void playRound(MastermindDigits& game) +{ + int tip; + int won=0; + int round=1; + + do { + cout << endl << "Ihr Tip: "; + cin >> tip; + MastermindDigits user(tip); + cout << "Position richtig: " << game.locationRight(user) << endl; + cout << "Ansonsten richtig: " << game.locationWrong(user) << endl; + if (game.locationRight(user)==4) + { + won=1; + cout << endl << "Sie haben gewonnen!" << endl; + system("pause"); + } + round++; + } while ((won==0) && (round <= MAXROUND)); +} diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.cpp b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsp b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsp new file mode 100644 index 0000000..642caa2 --- /dev/null +++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsp @@ -0,0 +1,108 @@ +# Microsoft Developer Studio Project File - Name="mastermind" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=mastermind - Win32 Debug +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "mastermind.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "mastermind.mak" CFG="mastermind - Win32 Debug" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "mastermind - Win32 Release" (basierend auf "Win32 (x86) Console Application") +!MESSAGE "mastermind - Win32 Debug" (basierend auf "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "mastermind" +# PROP Scc_LocalPath "." +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "mastermind - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "mastermind - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "mastermind - Win32 Release" +# Name "mastermind - Win32 Debug" +# Begin Group "Quellcodedateien" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\main.cpp +# End Source File +# Begin Source File + +SOURCE=.\mastermind.cpp +# End Source File +# End Group +# Begin Group "Header-Dateien" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\mastermind.h +# End Source File +# End Group +# Begin Group "Ressourcendateien" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsw b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsw new file mode 100644 index 0000000..580dad6 --- /dev/null +++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsw @@ -0,0 +1,33 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! + +############################################################################### + +Project: "mastermind"=.\mastermind.dsp - Package Owner=<4> + +Package=<5> +{{{ + begin source code control + mastermind + . + end source code control +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.h b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.h new file mode 100644 index 0000000..e69de29 diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.ncb b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.ncb new file mode 100644 index 0000000..1309382 Binary files /dev/null and b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.ncb differ diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.opt b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.opt new file mode 100644 index 0000000..3c43e3f Binary files /dev/null and b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.opt differ diff --git a/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.plg b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.plg new file mode 100644 index 0000000..33980de --- /dev/null +++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.plg @@ -0,0 +1,33 @@ + + +

+

Erstellungsprotokoll

+

+--------------------Konfiguration: mastermind - Win32 Debug-------------------- +

+

Befehlszeilen

+Erstellen der temporären Datei "C:\DOKUME~1\SVEN~1.HOM\LOKALE~1\Temp\RSP195.tmp" mit Inhalten +[ +/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/mastermind.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"D:\Studium\Prog2\Prakt1\prg2p1\mastermind\mastermind.cpp" +] +Creating command line "cl.exe @C:\DOKUME~1\SVEN~1.HOM\LOKALE~1\Temp\RSP195.tmp" +Erstellen der temporären Datei "C:\DOKUME~1\SVEN~1.HOM\LOKALE~1\Temp\RSP196.tmp" mit Inhalten +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/mastermind.pdb" /debug /machine:I386 /out:"Debug/mastermind.exe" /pdbtype:sept +.\Debug\main.obj +.\Debug\mastermind.obj +] +Erstellen der Befehlzeile "link.exe @C:\DOKUME~1\SVEN~1.HOM\LOKALE~1\Temp\RSP196.tmp" +

Ausgabefenster

+Kompilierung läuft... +mastermind.cpp +Linker-Vorgang läuft... + + + +

Ergebnisse

+mastermind.exe - 0 Fehler, 0 Warnung(en) +
+ + -- cgit v1.2.3