Explorar el Código

dice is now rolled when it is constructed.

wes hace 4 años
padre
commit
77fd0ca85b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Qwixx/dice.cpp

+ 1 - 1
Qwixx/dice.cpp

@@ -1,9 +1,9 @@
 #include "dice.h"
 Dice::Dice(){
     srand(time(NULL));
+    roll();
 }
 int Dice::roll() {
-    std::vector<int> output;
     // generate 6 random numbers to assign to each die
     for (int i = 0; i<colors; i++) {
         // store numbers generated from rand into output