Browse Source

quick and dirty implementation, mostly by copy&paste

master
Thomas Papendieck 3 years ago
parent
commit
5c4aabf824
  1. 3
      TDD-pure-function/src/main/java/de/edu/hsfulda/ciip/tdd/BownlingCalculator.java

3
TDD-pure-function/src/main/java/de/edu/hsfulda/ciip/tdd/BownlingCalculator.java

@ -22,6 +22,9 @@ public class BownlingCalculator {
sum += evaluateFrames(listOfThrows, SPARE, m -> PINS_IN_FRAME//
- Integer.parseInt(m.group(SPARE_FRAME_FIRST_THROW))
+ Integer.parseInt(m.group(SPARE_FRAME_FOLLOWING_THROW)));
sum += evaluateFrames(listOfThrows, "X (\\d)(\\d)", m -> PINS_IN_FRAME//
+ Integer.parseInt(m.group(1))
+ Integer.parseInt(m.group(2)));
return sum;
}

Loading…
Cancel
Save