()
| 302 | } |
| 303 | |
| 304 | private feedMill(): void{ |
| 305 | if(this.getGame().getLollipops().getCurrent() >= this.getNumberOfLollipopsToFeedTheMill()){ |
| 306 | // Pay the lollipops |
| 307 | this.getGame().getLollipops().add(-this.getNumberOfLollipopsToFeedTheMill()); |
| 308 | |
| 309 | // Increase the candies production step |
| 310 | var oldCurrent: number = Saving.loadNumber("lollipopFarmCurrentCandiesProduction"); |
| 311 | Saving.saveNumber("lollipopFarmCurrentCandiesProduction", Saving.loadNumber("lollipopFarmCurrentCandiesProduction") + Saving.loadNumber("lollipopFarmPreviousCandiesProduction")); |
| 312 | Saving.saveNumber("lollipopFarmPreviousCandiesProduction", oldCurrent); |
| 313 | |
| 314 | // Update |
| 315 | this.update(); |
| 316 | this.getGame().updatePlace(); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | private getNumberOfLollipopsToFeedTheMill(): number{ |
| 321 | return Math.pow(Saving.loadNumber("lollipopFarmCurrentCandiesProduction") * 120, 2); |
nothing calls this directly
no test coverage detected