Katrice Williams-Dredden 6 年之前
父節點
當前提交
22d19a91f3
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      src/main/java/Simulation.java

+ 2
- 1
src/main/java/Simulation.java 查看文件

@@ -7,7 +7,7 @@ public class Simulation {
7 7
 
8 8
     //constructor
9 9
     public Simulation(Integer numOfTosses, Integer numOfOfDies){
10
-        Dice dice = new Dice(numOfOfDies);
10
+        dice = new Dice(numOfOfDies);
11 11
 
12 12
         startBound = numOfOfDies;
13 13
         endBound = numOfOfDies * 6;
@@ -18,6 +18,7 @@ public class Simulation {
18 18
     }
19 19
 
20 20
     public void runSimulation(){
21
+
21 22
         for (int i = 0; i < numOfTosses; i++){
22 23
             bins.addToBin(dice.sumOfToss());
23 24
         }