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

Method run

code/main/SuperRPG.ts:84–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 }
83
84 public run(): boolean{
85 // To store the return value
86 var returnValue: boolean = false;
87
88 // If we should exit the game, we do so now
89 if(this.shouldExitGame)
90 return true;
91
92 // Reset the area
93 this.getRenderArea().resetAllButSize();
94
95 // Do something different depending on the step
96 switch(this.step){
97 case SuperRPGStep.SPLASH_SCREEN:
98 this.drawSplashScreen();
99 returnValue = this.runSplashScreen();
100 break;
101 case SuperRPGStep.GAME:
102 this.drawGame();
103 returnValue = this.runGame();
104 break;
105 case SuperRPGStep.LOSE:
106 this.drawLose();
107 returnValue = false;
108 break;
109 }
110
111 // We return
112 return returnValue;
113 }
114
115 // Public getters
116 public getCoins(): number{

Callers 5

uFunction · 0.45
erFunction · 0.45
runGameMethod · 0.45
handlePatternsMethod · 0.45
runLinksMethod · 0.45

Calls 7

drawSplashScreenMethod · 0.95
runSplashScreenMethod · 0.95
drawGameMethod · 0.95
runGameMethod · 0.95
drawLoseMethod · 0.95
resetAllButSizeMethod · 0.80
getRenderAreaMethod · 0.45

Tested by

no test coverage detected