MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / goToLose

Method goToLose

code/main/GalacticWars.ts:262–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

260 }
261
262 private goToLose(): void{
263 // Change the step
264 this.step = GalacticWarsStep.LOSE;
265
266 // Get the candies
267 this.getThirdHouse().getGame().getCandies().add(this.score + Algo.correctIfUnderZero(this.score-1000)*30);
268
269 // Update the best score
270 if(this.score > Saving.loadNumber("galacticWarsBestScore")) Saving.saveNumber("galacticWarsBestScore", this.score);
271 }
272
273 private goToGame(): void{
274 // Change the step

Callers 1

runGameMethod · 0.95

Calls 4

getThirdHouseMethod · 0.80
addMethod · 0.65
getCandiesMethod · 0.45
getGameMethod · 0.45

Tested by

no test coverage detected