Преглед изворни кода

Add difficulty_class to dice.

Sam Jaffe пре 4 година
родитељ
комит
e3538e45da
1 измењених фајлова са 3 додато и 2 уклоњено
  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{};
 };
 
 /**