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

Method drawLollipopStuff

code/main/Forge.ts:116–129  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

114 }
115
116 private drawLollipopStuff(x: number, y: number): void{
117 // If we didn't find the lollipop yet
118 if(Saving.loadBool("forgeFoundLollipop") == false){
119 // We add a button to take the lollipop on the cupboard
120 this.renderArea.addAsciiButton(x, x+5, y, "forgeLollipopButton");
121 // We add the link
122 this.renderArea.addLinkCall(".forgeLollipopButton", new CallbackCollection(this.takeLollipop.bind(this)));
123 }
124 // Else, we found the lollipop
125 else{
126 // We erase the lollipop
127 this.renderArea.drawString(" ", x, y);
128 }
129 }
130
131 private takeLollipop(): void{
132 // If we didn't get the lollipop yet

Callers 1

updateMethod · 0.95

Calls 4

addAsciiButtonMethod · 0.80
addLinkCallMethod · 0.80
bindMethod · 0.80
drawStringMethod · 0.80

Tested by

no test coverage detected