diff --git a/src/RoomRunner.ts b/src/RoomRunner.ts index fe00b12..277fc86 100644 --- a/src/RoomRunner.ts +++ b/src/RoomRunner.ts @@ -1,8 +1,8 @@ import { CreepRequisition, CreepRole, CreepRoles, RoleDefinition } from "types/creeps"; import { DEFAULT_GAME_CONFIG } from "types/gameConfig"; import { createSourcePositionMatrix, forEachMatrixSpot, getPositionWithDelta, setSpotStatus, SourceSpotStatus } from "types/source"; -import { checkPositionWalkable } from "utils/funcs/check_position"; -import { get_role_const as get_role_cost } from "utils/funcs/get_role_const"; +import { checkPositionWalkable } from "utils/funcs/checkPosition"; +import { get_role_cost as get_role_cost } from "utils/funcs/getRoleCost"; class RoomRunner { public static run(room: Room, state: GameState): GameState { diff --git a/src/roleHandlers/base.handler.interface.ts b/src/roleHandlers/BaseHandler.interface.ts similarity index 100% rename from src/roleHandlers/base.handler.interface.ts rename to src/roleHandlers/BaseHandler.interface.ts diff --git a/src/roleHandlers/harvester.handler.ts b/src/roleHandlers/harvester.handler.ts index 55cde7b..3e3307e 100644 --- a/src/roleHandlers/harvester.handler.ts +++ b/src/roleHandlers/harvester.handler.ts @@ -1,5 +1,5 @@ -import { getSourceById, getSpawnById } from "utils/funcs/get_by_id"; -import { RoleHandler } from "./base.handler.interface"; +import { getSourceById, getSpawnById } from "utils/funcs/getById"; +import { RoleHandler } from "./BaseHandler.interface"; import { getNextEmptySpot, getPositionWithDelta, setSpotStatus, SourceSpotStatus } from "types/source"; import { SourceDestination } from "types/creeps"; diff --git a/src/roleHandlers/index.ts b/src/roleHandlers/index.ts index a8fdb44..638e512 100644 --- a/src/roleHandlers/index.ts +++ b/src/roleHandlers/index.ts @@ -1,4 +1,4 @@ -import { RoleHandler } from "./base.handler.interface"; +import { RoleHandler } from "./BaseHandler.interface"; import HarvesterHandler from "./harvester.handler"; import UpgraderHandler from "./upgrader.handler"; diff --git a/src/roleHandlers/upgrader.handler.ts b/src/roleHandlers/upgrader.handler.ts index a7c7fc6..9573a07 100644 --- a/src/roleHandlers/upgrader.handler.ts +++ b/src/roleHandlers/upgrader.handler.ts @@ -1,5 +1,5 @@ -import { getControllerById, getSourceById } from "utils/funcs/get_by_id"; -import { RoleHandler } from "./base.handler.interface"; +import { getControllerById, getSourceById } from "utils/funcs/getById"; +import { RoleHandler } from "./BaseHandler.interface"; import { getNextEmptySpot, getPositionWithDelta, setSpotStatus, SourceSpotStatus } from "types/source"; diff --git a/src/types/gameConfig.ts b/src/types/gameConfig.ts index 61c8e78..d366373 100644 --- a/src/types/gameConfig.ts +++ b/src/types/gameConfig.ts @@ -5,9 +5,6 @@ import { CreepRequisition } from "./creeps"; * Used to manage the overall game state and ensure proper role distribution. */ export type GameConfig = { - /** The maximum number of creeps allowed in the game. */ - maxCreeps: number; - /** * The minimum number of creeps required for each role. * Creeps will be spawned to meet these minimums before allocating new roles. @@ -22,7 +19,6 @@ export type GameConfig = { * @type {GameConfig} */ export const DEFAULT_GAME_CONFIG: GameConfig = { - maxCreeps: 10, minCreepsPerRole: { harvester: 3, upgrader: 7, diff --git a/src/utils/funcs/check_position.ts b/src/utils/funcs/checkPosition.ts similarity index 100% rename from src/utils/funcs/check_position.ts rename to src/utils/funcs/checkPosition.ts diff --git a/src/utils/funcs/get_by_id.ts b/src/utils/funcs/getById.ts similarity index 100% rename from src/utils/funcs/get_by_id.ts rename to src/utils/funcs/getById.ts diff --git a/src/utils/funcs/get_role_const.ts b/src/utils/funcs/getRoleCost.ts similarity index 74% rename from src/utils/funcs/get_role_const.ts rename to src/utils/funcs/getRoleCost.ts index 2b5cadf..4bc3a5e 100644 --- a/src/utils/funcs/get_role_const.ts +++ b/src/utils/funcs/getRoleCost.ts @@ -1,6 +1,6 @@ import { RoleDefinition } from "types/creeps"; -export const get_role_const = (role: RoleDefinition) => { +export const get_role_cost = (role: RoleDefinition) => { return role.body.reduce((cost, part) => { cost += BODYPART_COST[part] || 0; return cost;