diff --git a/src/types/creeps.ts b/src/types/creeps.ts index 53ec1c7..f5df354 100644 --- a/src/types/creeps.ts +++ b/src/types/creeps.ts @@ -2,8 +2,7 @@ export type RoleDefinition = { name: string; body: BodyPartConstant[]; priority: number; -} - +}; export const CreepRoles = { harvester: { @@ -23,9 +22,6 @@ export const CreepRoles = { } } satisfies Record; - export type CreepRole = keyof typeof CreepRoles; - - export type CreepRequisition = Record; diff --git a/src/types/gameConfig.ts b/src/types/gameConfig.ts index 85a8a8e..7f98776 100644 --- a/src/types/gameConfig.ts +++ b/src/types/gameConfig.ts @@ -1,7 +1,5 @@ import { CreepRequisition } from "./creeps"; - - /** * Configuration for the game, defining limits and minimum requirements for creeps. * Used to manage the overall game state and ensure proper role distribution. @@ -17,7 +15,6 @@ export type GameConfig = { minCreepsPerRole: CreepRequisition; }; - /** * Default game configuration with maximum creeps and minimum creeps per role. * This configuration is used to initialize the game state and ensure that the game runs smoothly. diff --git a/src/utils/funcs/get_role_const.ts b/src/utils/funcs/get_role_const.ts index 317dfd4..2b5cadf 100644 --- a/src/utils/funcs/get_role_const.ts +++ b/src/utils/funcs/get_role_const.ts @@ -1,8 +1,8 @@ -import { RoleDefinition } from "types/creeps" +import { RoleDefinition } from "types/creeps"; export const get_role_const = (role: RoleDefinition) => { return role.body.reduce((cost, part) => { cost += BODYPART_COST[part] || 0; return cost; - }, 0) -} + }, 0); +};