Browse Source

Add difficulty_class to dice.

Sam Jaffe 4 năm trước cách đây
mục cha
commit
e3538e45da
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      include/dice-roll/die.h

+ 3 - 2
include/dice-roll/die.h

@@ -37,8 +37,8 @@ struct difficulty_class {
   
   bool operator()(int value) const;
   
-  test comp;
-  int against;
+  test comp{test::None};
+  int against{0};
 };
 
 // Default value: 1{+0}
@@ -46,6 +46,7 @@ struct dice {
   int num{1};
   std::vector<die> of{};
   std::vector<mod> modifier{+0};
+  difficulty_class dc{};
 };
 
 /**