summaryrefslogtreecommitdiffstats
path: root/Bachelor/Prog2/Prakt1/prg2p1
diff options
context:
space:
mode:
Diffstat (limited to 'Bachelor/Prog2/Prakt1/prg2p1')
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.ilkbin0 -> 886637 bytes
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pchbin0 -> 2040260 bytes
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pdbbin0 -> 1363124 bytes
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.idbbin0 -> 83028 bytes
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.pdbbin0 -> 111517 bytes
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/main.cpp73
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.cpp0
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsp108
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.dsw33
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.h0
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.ncbbin0 -> 50210 bytes
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.optbin0 -> 54462 bytes
-rw-r--r--Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.plg33
13 files changed, 247 insertions, 0 deletions
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
--- /dev/null
+++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.ilk
Binary files 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
--- /dev/null
+++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pch
Binary files 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
--- /dev/null
+++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/mastermind.pdb
Binary files 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
--- /dev/null
+++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.idb
Binary files 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
--- /dev/null
+++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/Debug/vc60.pdb
Binary files 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 <iostream>
+#include <cstdlib>
+#include <ctime>
+#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"<<endl;
+ cin >> 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
--- /dev/null
+++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.cpp
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
--- /dev/null
+++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.h
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
--- /dev/null
+++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.ncb
Binary files 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
--- /dev/null
+++ b/Bachelor/Prog2/Prakt1/prg2p1/mastermind/mastermind.opt
Binary files 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 @@
+<html>
+<body>
+<pre>
+<h1>Erstellungsprotokoll</h1>
+<h3>
+--------------------Konfiguration: mastermind - Win32 Debug--------------------
+</h3>
+<h3>Befehlszeilen</h3>
+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"
+<h3>Ausgabefenster</h3>
+Kompilierung läuft...
+mastermind.cpp
+Linker-Vorgang läuft...
+
+
+
+<h3>Ergebnisse</h3>
+mastermind.exe - 0 Fehler, 0 Warnung(en)
+</pre>
+</body>
+</html>