All files / js signals.js

100% Statements 12/12
100% Branches 1/1
0% Functions 0/3
100% Lines 12/12

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 1373x 73x 73x 73x 73x 73x 73x 73x 73x 73x 73x 73x  
// signals.js — Game loop signal classes for flow control.
// Thrown as exceptions to transfer control between game, shell, and UI.
 
export class ShellEscape {    // ! or #shell — enter subshell, then return
    constructor() { this.message = 'ShellEscape'; }
}
export class GameQuit {       // #quit or S — exit to shell
    constructor(message) { this.message = message || 'GameQuit'; }
}
export class GameInterrupt {  // ^C — interrupt to shell
    constructor() { this.message = 'GameInterrupt'; }
}