Changes to esbuild and adds initial creation of creaps
This commit is contained in:
34
src/types/gameConfig.ts
Normal file
34
src/types/gameConfig.ts
Normal 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
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user