summaryrefslogtreecommitdiffstats
path: root/Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSim.h
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSim.h
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSim.h')
-rw-r--r--Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSim.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSim.h b/Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSim.h
new file mode 100644
index 0000000..f7b5c59
--- /dev/null
+++ b/Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSim.h
@@ -0,0 +1,29 @@
+/*
+ * DiceSim.h
+ *
+ * Created on: 13.05.2011
+ * Author: sven
+ */
+
+#ifndef DICESIM_H_
+#define DICESIM_H_
+
+#include <vector>
+
+class DiceSim {
+public:
+ DiceSim(unsigned numDice, unsigned numRolls);
+ virtual ~DiceSim();
+ const std::vector<unsigned>& getResult() const
+ {
+ return mEyesAbsFreq;
+ }
+private:
+ unsigned mNumDice;
+ unsigned mNumRolls;
+ std::vector<unsigned> mEyesAbsFreq;
+ std::vector<unsigned>::iterator mResultIter;
+ unsigned rollDie();
+};
+
+#endif /* DICESIM_H_ */