/* * craps.cpp * * Created on: Sep 25, 2010 * Author: Michael J. Fischer * for use in Yale course CPSC 427a, Fall 2010 */ #include "main.hpp" // ---------------------------------------------------------------------------- int main(int argc, char* argv[]) { banner(); if (argc <= 1 || argc > 3) { cout << "usage: " << argv[0] << " num_rounds seed" << endl; return 1; } int num_rounds = strtol(argv[1], NULL, 0); long seed = (argc >= 3) ? strtol(argv[2], NULL, 0) : time(0); // Run experiment and print results Simulator sim( num_rounds, seed); sim.printResults(cout); bye(); }