diff --git a/src/img/shelves/FRIDGE_SHELF.svg b/src/img/shelves/FRIDGE_SHELF.svg new file mode 100644 index 0000000..0529861 --- /dev/null +++ b/src/img/shelves/FRIDGE_SHELF.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + 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; diff --git a/src/neural_network.py b/src/neural_network.py index 48243f6..6fcd729 100644 --- a/src/neural_network.py +++ b/src/neural_network.py @@ -130,7 +130,7 @@ def testing(n, testingSamples, testingLabels): print('Performance', scorecardArray.sum() / scorecardArray.size) testing(digitNetwork,dig_test_images,dig_test_labels) - +testing(letterNetwork,let_test_images,let_test_labels) li = [] ourOwnDataset = [] diff --git a/src/view/ordersView.js b/src/view/ordersView.js index 661b57a..d8e663a 100644 --- a/src/view/ordersView.js +++ b/src/view/ordersView.js @@ -2,8 +2,7 @@ class OrdersView { constructor() { OrdersView.instance = this; - - this.orders = []; + this.lastRecognizedText = ''; this.addMultipleCanvases(10); @@ -134,7 +133,7 @@ class OrdersView { const text = str.substring(0, str.length - 2); const number = parseInt(numberStr); - this.orders.push({ + Products.instance.addCustomJobRequest({ product: Product.REGISTRY[text], amount: number, x: 11, @@ -143,10 +142,4 @@ class OrdersView { this.closeWindow(); } - - getOrder() { - if (!this.orders.length) return null; - - return this.orders.shift(); - } } \ No newline at end of file