All files / games/roguelike/src/game/screens lose.ts

100% Statements 7/7
100% Branches 0/0
100% Functions 3/3
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21    21x   21x   8x         1x 22x         2x      
import { DisplayInterface, Engine } from "../index";
 
import { Screen } from "./screen";
 
export class LoseScreen extends Screen {
    public constructor(engine: Engine) {
        super("Lose", engine);
    }
 
    public render(display: DisplayInterface): void {
        // Render our prompt to the screen
        for (let i = 0; i < 22; i++) {
            display.drawText({ x: 2, y: i + 1 }, "%b{red}You lose! :(");
        }
    }
 
    public handleInput(): string | null {
        return null;
    }
}