Use floor instead of round.

This commit is contained in:
Kevin Dungs
2014-12-12 21:36:25 +01:00
parent e8bec621d8
commit 0466d6dac1
+2 -2
View File
@@ -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