Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void roll() {
- lastRoll.clear(); //clear out the last roll results
- lastSuccess = 0;
- for (int i=0;i<diceAmmount;i++) {
- boolean roteChance;
- if (rote == true) {
- roteChance = true;
- }
- else {
- roteChance = false;
- }
- boolean keepGoing = true;
- LinkedList<Integer> currentDie = new LinkedList<Integer>();
- lastRoll.add(i, currentDie);
- while(keepGoing) {
- int result = Die.roll();
- currentDie.add(result);
- if (result >= threshold) {
- lastSuccess++;
- }
- if (result < reroll) {
- if (roteChance != false)
- keepGoing = false;
- else {
- roteChance = false;
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment