Restructure services
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
export class CalculatorService {
|
||||
import { LevelCalculator, Standards, DEFAULT_STANDARDS_DATA } from "@blade-and-brawn/calculator";
|
||||
import type { ActivityPerformance, Player } from "@blade-and-brawn/domain";
|
||||
|
||||
export class CalculatorService {
|
||||
private readonly levelCalculator;
|
||||
|
||||
constructor() {
|
||||
this.levelCalculator = new LevelCalculator(
|
||||
new Standards(DEFAULT_STANDARDS_DATA),
|
||||
);
|
||||
}
|
||||
|
||||
calculate(player: Player, activityPerformances: ActivityPerformance[]) {
|
||||
return this.levelCalculator.calculate(player, activityPerformances)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user