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

Method nextStep

code/main/ATree.ts:88–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 }
87
88 private nextStep(): void{
89 // We change the step
90 Saving.saveNumber("aTreeStep", Saving.loadNumber("aTreeStep") + 1);
91
92 // We possibly do some action depending on the new step
93 if(Saving.loadNumber("aTreeStep") == 7){ // If we're going to play tic tac toe
94 this.startTicTacToe();
95 }
96 if(Saving.loadNumber("aTreeStep") == 9){ // If we won the tic tac toe game
97 this.getGame().gainItem("gridItemPossessedThirdHouseKey");
98 }
99
100 // We update
101 this.update();
102 this.getGame().updatePlace();
103 }
104
105 private playTicTacToe_copyBoard(board: ATreeTicTacToeSign[][]): ATreeTicTacToeSign[][]{
106 // Create the new board

Callers 2

constructorMethod · 0.95

Calls 5

startTicTacToeMethod · 0.95
updateMethod · 0.95
gainItemMethod · 0.80
updatePlaceMethod · 0.80
getGameMethod · 0.45

Tested by

no test coverage detected