Minor Namming Fixes

This commit is contained in:
2025-07-13 21:46:51 -03:00
parent 2c93b65b3d
commit 6ebf591d64
9 changed files with 8 additions and 12 deletions

View File

@@ -1,8 +1,8 @@
import { CreepRequisition, CreepRole, CreepRoles, RoleDefinition } from "types/creeps"; import { CreepRequisition, CreepRole, CreepRoles, RoleDefinition } from "types/creeps";
import { DEFAULT_GAME_CONFIG } from "types/gameConfig"; import { DEFAULT_GAME_CONFIG } from "types/gameConfig";
import { createSourcePositionMatrix, forEachMatrixSpot, getPositionWithDelta, setSpotStatus, SourceSpotStatus } from "types/source"; import { createSourcePositionMatrix, forEachMatrixSpot, getPositionWithDelta, setSpotStatus, SourceSpotStatus } from "types/source";
import { checkPositionWalkable } from "utils/funcs/check_position"; import { checkPositionWalkable } from "utils/funcs/checkPosition";
import { get_role_const as get_role_cost } from "utils/funcs/get_role_const"; import { get_role_cost as get_role_cost } from "utils/funcs/getRoleCost";
class RoomRunner { class RoomRunner {
public static run(room: Room, state: GameState): GameState { public static run(room: Room, state: GameState): GameState {

View File

@@ -1,5 +1,5 @@
import { getSourceById, getSpawnById } from "utils/funcs/get_by_id"; import { getSourceById, getSpawnById } from "utils/funcs/getById";
import { RoleHandler } from "./base.handler.interface"; import { RoleHandler } from "./BaseHandler.interface";
import { getNextEmptySpot, getPositionWithDelta, setSpotStatus, SourceSpotStatus } from "types/source"; import { getNextEmptySpot, getPositionWithDelta, setSpotStatus, SourceSpotStatus } from "types/source";
import { SourceDestination } from "types/creeps"; import { SourceDestination } from "types/creeps";

View File

@@ -1,4 +1,4 @@
import { RoleHandler } from "./base.handler.interface"; import { RoleHandler } from "./BaseHandler.interface";
import HarvesterHandler from "./harvester.handler"; import HarvesterHandler from "./harvester.handler";
import UpgraderHandler from "./upgrader.handler"; import UpgraderHandler from "./upgrader.handler";

View File

@@ -1,5 +1,5 @@
import { getControllerById, getSourceById } from "utils/funcs/get_by_id"; import { getControllerById, getSourceById } from "utils/funcs/getById";
import { RoleHandler } from "./base.handler.interface"; import { RoleHandler } from "./BaseHandler.interface";
import { getNextEmptySpot, getPositionWithDelta, setSpotStatus, SourceSpotStatus } from "types/source"; import { getNextEmptySpot, getPositionWithDelta, setSpotStatus, SourceSpotStatus } from "types/source";

View File

@@ -5,9 +5,6 @@ import { CreepRequisition } from "./creeps";
* Used to manage the overall game state and ensure proper role distribution. * Used to manage the overall game state and ensure proper role distribution.
*/ */
export type GameConfig = { export type GameConfig = {
/** The maximum number of creeps allowed in the game. */
maxCreeps: number;
/** /**
* The minimum number of creeps required for each role. * The minimum number of creeps required for each role.
* Creeps will be spawned to meet these minimums before allocating new roles. * Creeps will be spawned to meet these minimums before allocating new roles.
@@ -22,7 +19,6 @@ export type GameConfig = {
* @type {GameConfig} * @type {GameConfig}
*/ */
export const DEFAULT_GAME_CONFIG: GameConfig = { export const DEFAULT_GAME_CONFIG: GameConfig = {
maxCreeps: 10,
minCreepsPerRole: { minCreepsPerRole: {
harvester: 3, harvester: 3,
upgrader: 7, upgrader: 7,

View File

@@ -1,6 +1,6 @@
import { RoleDefinition } from "types/creeps"; 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) => { return role.body.reduce((cost, part) => {
cost += BODYPART_COST[part] || 0; cost += BODYPART_COST[part] || 0;
return cost; return cost;