diff --git a/src/logic/evolution.js b/src/logic/evolution.js index c850a9d..36d4dbc 100644 --- a/src/logic/evolution.js +++ b/src/logic/evolution.js @@ -9,6 +9,7 @@ class Evolution extends Arrangement { this.setup(); this.productIndex = 0; this.productsAmount = [...Array(ShelfCount)].map(() => 0); + this.backlog = [] } generate() { @@ -77,7 +78,19 @@ class Evolution extends Arrangement { } } + addCustomJobRequest(productName, amount, x, y) { + this.backlog.push({ + product: productName, + amount, + x, y + }); + } + getJobRequest() { + if (this.backlog.length > 0) { + return this.backlog.pop() + } + if (this.productIndex > ShelfCount) return null;