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

Method runGame

code/main/ThirdHouse.ts:97–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95 }
96
97 private runGame(): void{
98 // If there's a game running, we run it
99 if(this.gameRunning != null){
100 // If it should stop running
101 if(this.gameRunning.run() == true){
102 this.gameRunning = null; // We set it to null
103 // We update
104 this.update();
105 this.getGame().updatePlace();
106 }
107 // Else
108 else{
109 // We update
110 this.update();
111 // We draw the game on the screen
112 this.renderArea.drawArea(this.gameRunning.getRenderArea(), 19, 10);
113 // We update at the game level
114 this.getGame().updatePlace();
115 }
116 }
117 }
118
119 private update(): void{
120 // Erase everything

Callers

nothing calls this directly

Calls 6

updateMethod · 0.95
updatePlaceMethod · 0.80
drawAreaMethod · 0.80
runMethod · 0.45
getGameMethod · 0.45
getRenderAreaMethod · 0.45

Tested by

no test coverage detected