From 011dda197d7ea2e7102094a2b688f046f8e97317 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Sat, 5 Jul 2025 22:35:29 -0300 Subject: [PATCH] Formats Code --- src/types/creeps.ts | 6 +----- src/types/gameConfig.ts | 3 --- src/utils/funcs/get_role_const.ts | 6 +++--- 3 files changed, 4 insertions(+), 11 deletions(-) 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); +};