瀏覽代碼

dice is now rolled when it is constructed.

wes 4 年之前
父節點
當前提交
77fd0ca85b
共有 1 個文件被更改,包括 1 次插入1 次删除
  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