easier to understand

This commit is contained in:
mmaheshwari2 2025-02-13 14:51:21 -08:00
parent 4804e91011
commit 78843c9a26
2 changed files with 13 additions and 2 deletions

View file

@ -16,7 +16,6 @@ Object.keys(tasks).forEach(taskName => {
return;
}
// Extract category from task name
const category = taskName.split('_variant_')[0];
counts[category] = (counts[category] || 0) + 1;
});

View file

@ -2,11 +2,23 @@ import fs from 'fs';
import {proceduralGeneration} from "../../src/agent/construction_tasks.js";
function createInitialInventory(blueprint, agents) {
/*
params:
- blueprint object
- number of agents (for inventory initialization)
logic of the function:
- loop matrix
- every time a new material is hit, put it in a different agents inventory
-
*/
const inventories = {};
const materialCounts = {};
let currentAgent = 0;
// Initialize agent inventories
// Initialize inventories
for (let i = 0; i < agents; i++) {
inventories[i] = {};
}