randTest.cpp

URL: https://mirkwood.cs.edinboro.edu/~bennett/class/cmsc2040/fall2026/notes/words/code/randTest.cpp
 
#include <iostream>
#include "die.h"

using namespace std;

int main() {
   cout << "The current time is " << time(nullptr) << endl;

   srand(static_cast<unsigned int>(time(nullptr)));

   DieT a,b;
   InitDie(a, 4);
   InitDie(b, 4);


   for(int i = 0; i < 10; ++i) {
      //cout << rand() << endl;
      RollDie(a);
      RollDie(b);
      cout << GetDieValue(a) << " " << GetDieValue(b) << endl;
      
   }


   return 0;
}