()
| 95 | } |
| 96 | |
| 97 | private runGame(): void{ |
| 98 | // If there's a game running, we run it |
| 99 | if(this.gameRunning != null){ |
| 100 | // If it should stop running |
| 101 | if(this.gameRunning.run() == true){ |
| 102 | this.gameRunning = null; // We set it to null |
| 103 | // We update |
| 104 | this.update(); |
| 105 | this.getGame().updatePlace(); |
| 106 | } |
| 107 | // Else |
| 108 | else{ |
| 109 | // We update |
| 110 | this.update(); |
| 111 | // We draw the game on the screen |
| 112 | this.renderArea.drawArea(this.gameRunning.getRenderArea(), 19, 10); |
| 113 | // We update at the game level |
| 114 | this.getGame().updatePlace(); |
| 115 | } |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | private update(): void{ |
| 120 | // Erase everything |
nothing calls this directly
no test coverage detected