class FlatConePenaltyHandicapTimeScoringInteractor implements HandicapTimeScoringInteractor {

    @Override
    public void score(ScoredRun scoredRun) {
        Run run = scoredRun.getRun();
        BigDecimal scratchTime = run.getRawTime();
        BigDecimal handicapGroupFactor = run.getRegistration().getHandicapGroup().getFactor();
        BigDecimal competitionGroupFactor = run.getRegistration().getCompetitionGroup().getFactor();
        BigDecimal handicapTimeScratch = scratchTime.multiply(handicapGroupFactor)
                .multiply(competitionGroupFactor)
                .setScale(3, RoundingMode.HALF_UP);
        BigDecimal eventConePenaltySeconds = scoredRun.getRun().getEvent().getConePenaltySeconds();
        BigDecimal conePenaltySeconds = eventConePenaltySeconds.multiply(BigDecimal.valueOf(run.getCones()));
        BigDecimal handicapTimeScored = handicapTimeScratch.add(conePenaltySeconds);
        scoredRun.setHandicapTimeScored(handicapTimeScored);
    }

    @Inject public  FlatConePenaltyHandicapTimeScoringInteractor();

}