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

Method update

code/main/TheComputer.ts:400–413  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

398 }
399
400 private update(): void{
401 // If we have too much lines, delete some of them
402 if(this.lines.length > 12){
403 this.lines.splice(0, this.lines.length-12);
404 }
405
406 // If the last line type is COMMAND, we change its text by the current command text
407 if(this.lines.length > 0 && this.lines[this.lines.length-1].getType() == TheComputerLineType.COMMAND){
408 this.lines[this.lines.length-1].setLinesFromText(this.currentCommandText);
409 }
410
411 // Draw
412 this.draw();
413 }
414}

Callers 5

constructorMethod · 0.95
pressedDeleteMethod · 0.95
pressedEnterMethod · 0.95
pressedKeyMethod · 0.95
switchOnOffMethod · 0.95

Calls 3

drawMethod · 0.95
setLinesFromTextMethod · 0.80
getTypeMethod · 0.45

Tested by

no test coverage detected