-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
If one buys way too much farm, progress slows down to a crawl which sucks.
Since it allow us to put in negative number, why forbid it?
stopsign.github.io/Terrafold/game.js
Lines 91 to 102 in 38680d6
| this.buyFarms = function() { | |
| var toBuy = Number(document.getElementById('buyFarmAmount').value); | |
| if(toBuy * 50 > this.land.soil) { | |
| toBuy = Math.floor(this.land.soil/50); | |
| } | |
| if(toBuy <= 0) { | |
| return; | |
| } | |
| this.land.soil -= toBuy * 50; | |
| this.farms.addFarm(toBuy); | |
| view.update(); | |
| }; |
Metadata
Metadata
Assignees
Labels
No labels