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

Method addInsertCandiesButtons

code/main/ThirdHouse.ts:52–60  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

50 }
51
52 private addInsertCandiesButtons(x: number, y: number): void{
53 // First button (10 candies)
54 this.renderArea.addAsciiButton(x, x + 4, y, "thirdHouseInsert10CandiesButton");
55 this.renderArea.addLinkCall(".thirdHouseInsert10CandiesButton", new CallbackCollection(this.insert10Candies.bind(this)));
56
57 // Second button (1000 candies)
58 this.renderArea.addAsciiButton(x, x + 4, y+2, "thirdHouseInsert1000CandiesButton");
59 this.renderArea.addLinkCall(".thirdHouseInsert1000CandiesButton", new CallbackCollection(this.insert1000Candies.bind(this)));
60 }
61
62 private insert10Candies(): void{
63 // If we have enough candies

Callers 1

updateMethod · 0.95

Calls 3

addAsciiButtonMethod · 0.80
addLinkCallMethod · 0.80
bindMethod · 0.80

Tested by

no test coverage detected