summaryrefslogtreecommitdiffstats
path: root/Master/Modellbildung_und_Simulation/Aufgabenblatt2/DiceSim/src/DiceSim.h
blob: f7b5c592bca9c72b8ea07226ac0f5312f5831bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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_ */