From 0cfc587fd011c8cbbb2d3b2f97674ab4ce004102 Mon Sep 17 00:00:00 2001 From: MasterGordon Date: Sat, 7 Apr 2018 13:49:39 +0200 Subject: [PATCH] Fixed --- js/baseclasses.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/baseclasses.js b/js/baseclasses.js index a324720..ec91e41 100644 --- a/js/baseclasses.js +++ b/js/baseclasses.js @@ -168,11 +168,14 @@ class Item { } } +//var bodenvorkommen = ["copper","stonecoal","browncoal",""] + class Factory { constructor(tier) { this.tier = tier if (this.tier == undefined) this.tier = 0 + this.tiles = [] this.items = [] for (var x = 0; x < 25; x++) { @@ -186,7 +189,7 @@ class Factory { moveItems() { for (var i = 0; i < this.items.length; i++) { this.items[i].move() - if (this.items[i].x <= 0 || this.items[i].x >= 1200 || this.items[i].y <= 0 || this.items[i].y >= 576) { + if (this.items[i].x < 0 || this.items[i].x >= 1200 || this.items[i].y < 0 || this.items[i].y >= 576) { console.log("removed Item") this.deleteItem(this.items[i]) } else {