()
| 303 | } |
| 304 | |
| 305 | private pressedDelete(): void{ |
| 306 | // If we're currently waiting for a command |
| 307 | if(this.state == TheComputerState.WAITING_FOR_COMMAND){ |
| 308 | // If the current command text contains at least one letter |
| 309 | if(this.currentCommandText.length > 0){ |
| 310 | // We delete the last character |
| 311 | this.currentCommandText = this.currentCommandText.slice(0, this.currentCommandText.length-1); |
| 312 | |
| 313 | // We update |
| 314 | this.update(); |
| 315 | this.getGame().updatePlace(); |
| 316 | } |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | private pressedEnter(): void{ |
| 321 | // Do something different depending on the current state |
nothing calls this directly
no test coverage detected