()
| 224 | } |
| 225 | |
| 226 | private drawGame(): void{ |
| 227 | // Draw the score |
| 228 | this.getRenderArea().drawString("Score : " + this.score.toString(), 0, 0); |
| 229 | |
| 230 | // Draw hp |
| 231 | this.getRenderArea().drawString("| HP : " + this.hp.toString(), 43, 0); |
| 232 | |
| 233 | // Draw the power |
| 234 | this.getRenderArea().drawString("| Power : [", 14, 0); |
| 235 | this.getRenderArea().drawHorizontalLine("x", 25, 25 + Math.floor(this.power / 150 * 16), 0); |
| 236 | this.getRenderArea().drawString("]", 41, 0); |
| 237 | |
| 238 | // Draw the ship |
| 239 | this.getRenderArea().drawArray(Database.getAscii("places/village/thirdHouseGames/GalacticWars/ship"), 0, 1 + this.shipYPosition); |
| 240 | |
| 241 | // Draw asteroids |
| 242 | for(var i = 0; i < this.asteroids.length; i++){ |
| 243 | this.getRenderArea().drawString("O", this.asteroids[i].x, 1 + this.asteroids[i].y); |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | private drawLose(): void{ |
| 248 | // Draw "you lose" |
no test coverage detected