Minor Namming Fixes
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user