From 0466d6dac11227f5b8e90c8401434bdf4a27cb3c Mon Sep 17 00:00:00 2001 From: Kevin Dungs Date: Fri, 12 Dec 2014 21:14:49 +0100 Subject: [PATCH] Use floor instead of round. --- js/gameobjects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/gameobjects.js b/js/gameobjects.js index 7f3768b..2a544fb 100644 --- a/js/gameobjects.js +++ b/js/gameobjects.js @@ -115,7 +115,7 @@ var GameObjects = (function() { this.state.info_levels.splice(0, 1); } var old_cost = this.state.cost; - this.state.cost = Math.round(this.state.cost * this.cost_increase); + this.state.cost = Math.floor(this.state.cost * this.cost_increase); return old_cost; } return -1; @@ -160,7 +160,7 @@ var GameObjects = (function() { if (lab && lab.buy(this.state.cost)) { this.state.hired++; var cost = this.state.cost; - this.state.cost = Math.round(cost * this.cost_increase); + this.state.cost = Math.floor(cost * this.cost_increase); return cost; } return -1; // not enough money