()
| 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 | } |
no test coverage detected