@Test public void shouldOnlyCountScoreOfItsOwn() throws Exception { LastFrame lastFrame = new LastFrame(2, 8, 8); int score = lastFrame.countScore(); assertThat(score, is(18)); }
@Override public int countScore() { return firstBall + secondBall + thirdBall; }
LastFrame extends Frame { @Override public int countScore() { return firstBall + secondBall + thirdBall; } }
LastFrame extends Frame { @Override public int countScore() { return firstBall + secondBall + thirdBall; } LastFrame(int firstBall, int secondBall, int thirdBall); }
LastFrame extends Frame { @Override public int countScore() { return firstBall + secondBall + thirdBall; } LastFrame(int firstBall, int secondBall, int thirdBall); @Override int countScore(); @Override void setNextFrame(Frame nextFrame); }
LastFrame extends Frame { @Override public int countScore() { return firstBall + secondBall + thirdBall; } LastFrame(int firstBall, int secondBall, int thirdBall); @Override int countScore(); @Override void setNextFrame(Frame nextFrame);  }