game: Game) {
  <span style="color:#00f">const</span> frameCount = game.getFrameCount();
  game.setText(<span style="color:#a31515">`Frame count: </span><span style="color:#a31515">${</span>frameCount<span style="color:#a31515">}</span><span style="color:#a31515">`</span>);

  <span style="color:#00f">if</span> (frameCount === 100) {
    <span style="color:#008000">// We can stop the game with game.end()
</span><span style="color:#008000"></span>    game.end();
  }
}

<span style="color:#008000">// onKeyPre