Changes to esbuild and adds initial creation of creaps

This commit is contained in:
2025-07-05 22:34:23 -03:00
parent d72f3ec851
commit 06d4eff5c9
9 changed files with 669 additions and 33 deletions

34
src/types/gameConfig.ts Normal file
View File

@@ -0,0 +1,34 @@
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.
*/
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.
*/
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.
*
* @type {GameConfig}
*/
export const DEFAULT_GAME_CONFIG: GameConfig = {
maxCreeps: 50,
minCreepsPerRole: {
harvester: 5,
upgrader: 5,
builder: 5
}
};