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

Method eraseEverything

code/main/RenderArea.ts:419–437  ·  view source on GitHub ↗
(character: string = " ")

Source from the content-addressed store, hash-verified

417 }
418
419 public eraseEverything(character: string = " "): boolean{
420 var str: string;
421
422 // We check if the character is correct, return false if it isn't
423 if(character.length != 1)
424 return false;
425
426 // We prepare the string
427 str = "";
428 str = str.fillWith(character, this.width);
429
430 // We fill all the lines with the character given in parameter
431 for(var i = 0; i < this.height; i++){
432 this.drawString(str, 0, i);
433 }
434
435 // We return true
436 return true;
437 }
438
439 public removeAllLinks(): void{
440 this.links = [];

Callers 2

resetAllButSizeMethod · 0.95
updateMethod · 0.80

Calls 2

drawStringMethod · 0.95
fillWithMethod · 0.80

Tested by

no test coverage detected