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

Method addMultipleAsciiButtons

code/main/RenderArea.ts:171–184  ·  view source on GitHub ↗
(otherClass: string, ...coordinates: number[])

Source from the content-addressed store, hash-verified

169 }
170
171 public addMultipleAsciiButtons(otherClass: string, ...coordinates: number[]): boolean{
172 // If the length of the coordinates array isn't multiple of 3, we return false
173 if(coordinates.length % 3 != 0)
174 return false;
175
176 // We add all the buttons
177 for(var i = 0; i < coordinates.length / 3; i++){
178 if(this.addAsciiButton(coordinates[3*i], coordinates[3*i+1], coordinates[3*i+2], otherClass) == false)
179 return false;
180 }
181
182 // We return true
183 return true;
184 }
185
186 public addMultipleAsciiNinjaButtons(otherClass: string, ...coordinates: number[]): boolean{
187 // If the length of the coordinates array isn't multiple of 3, we return false

Callers 15

drawCauldronMethod · 0.80
drawHatMethod · 0.80
loadSecondHouseMethod · 0.80
loadThirdHouseMethod · 0.80
loadForgeMethod · 0.80
loadFourthHouseMethod · 0.80
loadFifthHouseMethod · 0.80
drawFireButtonMethod · 0.80
drawObjectMethod · 0.80
addFirstDoorButtonMethod · 0.80
addSecondDoorButtonMethod · 0.80
addThirdDoorButtonMethod · 0.80

Calls 1

addAsciiButtonMethod · 0.95

Tested by

no test coverage detected