/* * sim.hpp * * Created on: Sep 25, 2010 * Author: Michael J. Fischer * for use in Yale course CPSC 427a, Fall 2010 */ #pragma once #include "craps.hpp" #include "dice.hpp" #include "params.hpp" class Simulator { private: int numRounds; // number of rounds in experiment Dice* dice; // dice to use Craps* crapsGame; // craps game to test public: Simulator(int num_rounds, Dice* dice) { this->numRounds = num_rounds; this->dice = dice; this->crapsGame = new Craps(dice); experiment(); } Simulator(Params& p); ~Simulator() { delete dice; delete crapsGame; } void experiment(); // run experiment ostream& print(ostream& out) const; ostream& printResults(ostream& out) const; }; //------------------------------------------------------------------- inline ostream& operator<<(ostream& out, const Simulator& sim) { return sim.print(out); }