mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
refactor: rename support to utility in RoleIdentificationService too
This commit is contained in:
parent
e3f6103a0d
commit
68e3cb821b
1 changed files with 2 additions and 13 deletions
|
|
@ -11,14 +11,6 @@ export interface ChampionsPlayRate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FinalRoleComposition {
|
|
||||||
TOP?: number
|
|
||||||
JUNGLE?: number
|
|
||||||
MIDDLE?: number
|
|
||||||
BOTTOM?: number
|
|
||||||
SUPPORT?: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RoleComposition {
|
export interface RoleComposition {
|
||||||
TOP?: number
|
TOP?: number
|
||||||
JUNGLE?: number
|
JUNGLE?: number
|
||||||
|
|
@ -215,7 +207,7 @@ class RoleIdentificationService {
|
||||||
composition: number[],
|
composition: number[],
|
||||||
jungle?: number,
|
jungle?: number,
|
||||||
support?: number
|
support?: number
|
||||||
): FinalRoleComposition {
|
): RoleComposition {
|
||||||
// Set composition champion playrate to 0% if not present in the json data
|
// Set composition champion playrate to 0% if not present in the json data
|
||||||
for (const compChamp of composition) {
|
for (const compChamp of composition) {
|
||||||
if (championPositions[compChamp]) {
|
if (championPositions[compChamp]) {
|
||||||
|
|
@ -304,10 +296,7 @@ class RoleIdentificationService {
|
||||||
identified[best[0]] = best[1]
|
identified[best[0]] = best[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename UTILITY to SUPPORT
|
return positions
|
||||||
const { UTILITY: SUPPORT, ...rest } = positions
|
|
||||||
|
|
||||||
return { ...rest, SUPPORT }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue